Lambda
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Lambda( parameterNames, expression, outer?, parameterSymbols?, letScope?): Lambda;Parameters
Section titled “Parameters”parameterNames
Section titled “parameterNames”string[]
expression
Section titled “expression”ASTRootNode
outer?
Section titled “outer?”LambdaBindings | null
parameterSymbols?
Section titled “parameterSymbols?”Map<string, LambdaParameterSymbol> | null
letScope?
Section titled “letScope?”LambdaLetScope | null
Returns
Section titled “Returns”Lambda
Properties
Section titled “Properties”boundArgs
Section titled “boundArgs”readonly boundArgs: Map<LambdaParameterSymbol, LambdaArg> | undefined;expression
Section titled “expression”readonly expression: ASTRootNode;letScope
Section titled “letScope”readonly letScope: LambdaLetScope | null;ownParameterSymbols
Section titled “ownParameterSymbols”readonly ownParameterSymbols: DefaultMap<string, LambdaParameterSymbol>;parameterNames
Section titled “parameterNames”readonly parameterNames: string[];parameterSymbols
Section titled “parameterSymbols”readonly parameterSymbols: Map<string, LambdaParameterSymbol>;Accessors
Section titled “Accessors”numParams
Section titled “numParams”Get Signature
Section titled “Get Signature”get numParams(): number;Returns
Section titled “Returns”number
Methods
Section titled “Methods”argCountError()
Section titled “argCountError()”argCountError(numArgs, _mode): string | null;Why this lambda refuses a call with numArgs arguments in the given mode, as an error
detail, or null where it accepts the call. A LAMBDA takes exactly its parameters; a
subclass wrapping a built-in function accepts what the function’s signature in that mode
accepts.
Parameters
Section titled “Parameters”numArgs
Section titled “numArgs”number
ModeBit
Returns
Section titled “Returns”string | null
call()
Section titled “call()”call(ctx, args): MaybeBoxedFormulaArgument;Parameters
Section titled “Parameters”Returns
Section titled “Returns”callWithAST()
Section titled “callWithAST()”callWithAST(ctx, args): MaybeBoxedFormulaArgument;Parameters
Section titled “Parameters”ASTNode[]
Returns
Section titled “Returns”toString()
Section titled “toString()”toString(): string;Returns
Section titled “Returns”string
withBoundArgs()
Section titled “withBoundArgs()”withBoundArgs(outer?, letScope?): Lambda;Parameters
Section titled “Parameters”outer?
Section titled “outer?”LambdaBindings | null
the parameter bindings of the enclosing lambdas
letScope?
Section titled “letScope?”LambdaLetScope | null
the name resolution of the LET scope in which the lambda is defined
Returns
Section titled “Returns”Lambda
a lambda with this one’s parameters and body, bound to outer and letScope
fromAST()
Section titled “fromAST()”static fromAST( ast, outer?, ctx?): Lambda;Parameters
Section titled “Parameters”ASTLambdaNode
the lambda definition
outer?
Section titled “outer?”LambdaBindings | null
the parameter bindings of the enclosing lambdas
the context in which the lambda is defined, to resolve names in its LET scope
Returns
Section titled “Returns”Lambda
the lambda, bound to outer and to the LET scope of ctx where there is one