Parameters: |
|
---|
Create an anonymouse function taking one argument. When the lambda is found in the formula, variables not present in it’s argument list are bound to variable in the environment before any call of the lambda function.
The Lambda function in EQ is just a limited version of the full function declaration, but can instantiated in any formula, depending of other parameters.
$ eq eval 'x := 3; (Lambda( x, x * x ))( 4 )'
16
The argument and the body are not evaluated when executed.
You can control if a substitution will happen by using one of the evaluation controlling function :
$ eq eval 'x := 3; (Lambda( x, Force(x) * x ))( 4 )'
12
You can see Evaluation control for further information