For list objects X where X != as.list(X), future_lapply(X) did not give the same result as lapply(X). Example:
X <- structure(list(a = 1, b = 2), class = "Foo")
as.list.Foo <- function(x, ...) c(X, c = 3)
y0 <- lapply(X, FUN = length)
str(y0)
# List of 3
# $ a: int 1
# $ b: int 1
# $ c: int 1
library(future.apply)
y1 <- future_lapply(X, FUN = length)
str(y1)
# List of 2
# $ a: int 1
# $ b: int 1
For list objects
X
whereX
!=as.list(X)
,future_lapply(X)
did not give the same result aslapply(X)
. Example: