According to lazy evaluation in R (Advanced R by H. Wickham P.85), the following code should return 20, however I get the return equal to 11. Did I misunderstand anything?
add <- function(x) {
function(y) x + y
}
adders <- lapply(1:10, add)
adders[[1]](10)