Specialised lapply functions for R6 or other OOP classes.
This is simply a wrapper that detects if FUN is a function, in which
case lapply is used as usual, or a string, in which case the given
field/method is returned as a list.
# NOT RUN {## lapply as usualloapply(c(1, 2, 3), identity)
## For R6 objectsobjs <- list(ooplah$new(), ooplah$new())
# Public fieldloapply(objs, "oop")
# Public methodloapply(objs, "hello")
# }