Minor cleanup of LIST

This commit is contained in:
Mike Cifelli 2017-03-03 15:57:16 -05:00
parent 311a3b4036
commit 946af24514
1 changed files with 4 additions and 4 deletions

View File

@ -8,16 +8,16 @@ import sexpression.*;
@FunctionNames({ "LIST" }) @FunctionNames({ "LIST" })
public class LIST extends LispFunction { public class LIST extends LispFunction {
public static Cons makeList(SExpression sexpr) {
return new Cons(sexpr, NIL);
}
private ArgumentValidator argumentValidator; private ArgumentValidator argumentValidator;
public LIST() { public LIST() {
this.argumentValidator = new ArgumentValidator("LIST"); this.argumentValidator = new ArgumentValidator("LIST");
} }
public static Cons makeList(SExpression sexpr) {
return new Cons(sexpr, NIL);
}
public Cons call(Cons argumentList) { public Cons call(Cons argumentList) {
argumentValidator.validate(argumentList); argumentValidator.validate(argumentList);