# NOT RUN {
f <- as_function(~ . + 1)
f(10)
# Primitive functions are regularised as closures
as_closure(list)
as_closure("list")
# Operators have `.x` and `.y` as arguments, just like lambda
# functions created with the formula syntax:
as_closure(`+`)
as_closure(`~`)
# }
Run the code above in your browser using DataLab