L1 <- list(a = "hst", b = NA_character_, c = 43)
L2 <- list(a = "gst", c = 42, d = list(letters))
updateList(L1, L2)
updateList(L1, NULL)
updateList(NULL, L2)
updateList(NULL, NULL) # should return empty list
Run the code above in your browser using DataLab