public static class Expression.LambdaExp extends Expression
Function
.Expression.Application, Expression.Binary, Expression.Block, Expression.Const, Expression.Ident, Expression.IfExp, Expression.LambdaExp, Expression.Tuple, Expression.Unary
Modifier and Type | Field and Description |
---|---|
Expression |
body |
Expression |
fparam |
Constructor and Description |
---|
LambdaExp(Expression fparam,
Expression body) |
Modifier and Type | Method and Description |
---|---|
void |
appendSB(java.lang.StringBuffer sb)
The use of a StringBuffer, sb, gives linear complexity when
printing large Values; also see
Expression.toString() . |
Value |
defer(Environment r)
It is in fact safe to return the
eval -uated
λ-Function (which contains the
given 'r'), after all λ-Function and
Value.Defer are very similar. |
Value.Lambda |
eval(Environment r)
Note, evaluate 'this' Lambda Expression to a Function, not
call a function.
|
int |
n()
n(), the numerical code (tag) of a subclass of Expression,
for example, for switch-ing.
|
error, toString
public final Expression fparam
public final Expression body
public LambdaExp(Expression fparam, Expression body)
public int n()
Expression
n
in class Expression
public Value defer(Environment r)
eval
-uated
λ-Function
(which contains the
given 'r'), after all λ-Function and
Value.Defer
are very similar.
(Also see Expression.Const.defer(la.la.Environment)
.)defer
in class Expression
public Value.Lambda eval(Environment r)
eval
in class Expression
public void appendSB(java.lang.StringBuffer sb)
Expression
Expression.toString()
.appendSB
in class Expression