15
What is an anonymous function? And why can it be called
função lambda
?What is the usefulness of an anonymous function in language
R
?Where it can be applied (for example, it can be applied in Function Operators)?
15
What is an anonymous function? And why can it be called função lambda
?
What is the usefulness of an anonymous function in language R
?
Where it can be applied (for example, it can be applied in Function Operators)?
9
What is anonymous function in R?
And why it can be called lambda function?
Lambda expressions are unnamed functions given as constant values. They may appear anywhere that any other constant, but are typically written as a parameter to some other function.
The word "lambda" or "lambda expressions" usually if refers to anonymous functions. So, in this sense, a lambda is a type function (anonymous function), but not every function is a lambda (ie, appointed functions are not usually called Mixed).
Therefore, anonymous functions in fine languages are treated as lambda.
What is the usefulness of an anonymous function in the R language?
Simple example of anonymous function in r:
# Sintaxe de função anônima
(function(x) x * 10)(10)
# equivalente (normal)
fun<-function(x) x * 10
fun(10)
Browser other questions tagged r anonymous-function
You are not signed in. Login or sign up in order to post.
I think a lot of the answers are in this link.
– bbiasi
Here is the tip for those who want to prepare a content about this in Portuguese : )
– Marcus Nunes