transcendental-lisp/src/sexpression/LambdaExpression.java

33 lines
703 B
Java

package sexpression;
import function.UserDefinedFunction;
@DisplayName("lambda-expression")
public class LambdaExpression extends SExpression {
private Cons lambdaExpression;
private UserDefinedFunction function;
public LambdaExpression(Cons lambdaExpression, UserDefinedFunction function) {
this.lambdaExpression = lambdaExpression;
this.function = function;
}
public boolean functionp() {
return true;
}
public Cons getLambdaExpression() {
return lambdaExpression;
}
public UserDefinedFunction getFunction() {
return function;
}
public String toString() {
return lambdaExpression.toString();
}
}