Class LetFun

java.lang.Object
  extended by LetFun
All Implemented Interfaces:
Expression

public class LetFun
extends java.lang.Object
implements Expression


Constructor Summary
LetFun(java.lang.String functionName, java.lang.String parameter, Expression functionBody, Expression letBody)
           
 
Method Summary
 Value eval(Environment env)
          Evaluate this expression.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LetFun

public LetFun(java.lang.String functionName,
              java.lang.String parameter,
              Expression functionBody,
              Expression letBody)
Method Detail

eval

public Value eval(Environment env)
Description copied from interface: Expression
Evaluate this expression. When an Expression is evaluated, this must happen in some particular environment. For example, evaluating the variable x in one environment might produce a totally different value than evaluating it in another environment.

Specified by:
eval in interface Expression
Parameters:
env - the environment in which the expression should be evaluated
Returns:
the value produced by the expression