There's a great Stack Overflow post about lambda functions, but it doesn't include an example of how to implement one in R! Help me change that by critiquing this reprex:
adder <- function(x) {
function(y) x + y
}
add5 <- adder(5)
add5(1)
#> [1] 6
Created on 2019-08-21 by the reprex package (v0.3.0)
Do you think this is adequate minimal example of a lambda function in R?