Skip to content

Instantly share code, notes, and snippets.

@gadenbuie
Created January 16, 2018 01:20
Show Gist options
  • Save gadenbuie/6baa1c9b7aad53084c227cf8c9e28431 to your computer and use it in GitHub Desktop.
Save gadenbuie/6baa1c9b7aad53084c227cf8c9e28431 to your computer and use it in GitHub Desktop.
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