Lambdas
Lambdas, or anonymous functions, are small functions created inside of another function. They have access to variables inside and parameters passed to that function. Budgie allows one-line lambdas to be passed in place of variables to other functions.
Lambda Types
To accept a lambda as a parameter, use the lambda type inline
command to declare its type. It takes in the lambda's return type and zero to two (parameterName, parameterType) pairs.
You can then use the lambda
command to call that lambda, which takes in the name of the lambda and any parameters to pass to it.
C#:
Python:
Lambda Declarations
New lambdas can be declared as parameters to called functions or other lambdas. Declare them with lambda declare
, which takes in the return type of the lambda, zero to two (parameterName, parameterType) pairs, and the (single line) body of the lambda.
C#:
Python:
Last updated