added "list" builtin

master
Jordan Orelli 12 years ago
parent a4e7333f86
commit 7ec2538005

@ -107,8 +107,6 @@ func length(vals []interface{}) (interface{}, error) {
return len(x), nil
}
/*
func car(vals []interface{}) (interface{}, error) {
func list(vals []interface{}) (interface{}, error) {
return sexp(vals), nil
}
*/

@ -28,13 +28,14 @@ var universe = &environment{map[symbol]interface{}{
"*": builtin(multiplication),
"/": builtin(division),
"length": builtin(length),
"list": builtin(list),
"not": builtin(not),
"begin": special(begin),
"define": special(define),
"quote": special(quote),
"if": special(_if),
"set!": special(set),
"lambda": special(mklambda),
"begin": special(begin),
"quote": special(quote),
"set!": special(set),
}, nil}
// parses the string lexeme into a value that can be eval'd

Loading…
Cancel
Save