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;
    }

    @Override
    public boolean isFunction() {
        return true;
    }

    public Cons getLambdaExpression() {
        return lambdaExpression;
    }

    public UserDefinedFunction getFunction() {
        return function;
    }

    @Override
    public String toString() {
        return lambdaExpression.toString();
    }

}
