Created
January 16, 2018 01:20
-
-
Save gadenbuie/6baa1c9b7aad53084c227cf8c9e28431 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reprex::reprex({ | |
library(purrr) | |
l1 <- list(a = list(a1 = 1:10)) | |
l2 <- list(a = list(a2 = 10:20)) | |
list_merge(l1, l2) | |
#' But both `l1` and `l2` are named... so arguments should be named? | |
list_merge(x = l1, y = l2) | |
#' Oh, l2 is implicitly unnamed because it's in dots | |
list_merge(l1, y = l2) | |
#' But what I *really* wanted was this | |
list_modify(l1, rlang::splice(l2)) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment