Description Usage Arguments Value Examples
View source: R/functional.R
Returns functor for 'map'-like applying
1
functor(init = c(0))
init
Initial vector
Functor
1 2 3 4
functor(c(1, 2, 3, 4))() # c(1, 2, 3, 4) functor(c(1, 2, 3, 4))(function(x) {x * 2})() # c(2, 4, 6, 8)
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.