org.millscript.millscript.functions
Class LambdaFunction
java.lang.Object
org.millscript.millscript.functions.Function
org.millscript.millscript.functions.LambdaFunction
public final class LambdaFunction
- extends Function
This class implements a function defined within a piece of MillScript code.
As such it may take a variable number of arguments, depending on its
definition.
|
Method Summary |
void |
apply(Machine mc,
int nargs)
Performs this function using the specified machine, with the specified
number of arguments. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LambdaFunction
public LambdaFunction(LocalIdent[] a,
LocalIdent r,
Action b)
- Constructs a new
LambdaFunction to execute the specified
body with the specified number of arguments.
- Parameters:
a - the local idents for the functions argumentsr - the optional ident for the argument that can soak up any
additional parameters to the functionb - the body of the function
apply
public void apply(Machine mc,
int nargs)
- Description copied from class:
Function
- Performs this function using the specified machine, with the specified
number of arguments.
- Specified by:
apply in class Function
- Parameters:
mc - the machine to perform this function onnargs - the number of arguments the function is being invoked with- See Also:
Function.apply(org.millscript.millscript.vm.Machine, int)
toString
public java.lang.String toString()
- Overrides:
toString in class Function
- See Also:
Object.toString()
Copyright © 2001-2007 Open World Ltd. All Rights Reserved.