diff options
Diffstat (limited to 'src/expand.cpp')
-rw-r--r-- | src/expand.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/expand.cpp b/src/expand.cpp index b50d627..0cbe118 100644 --- a/src/expand.cpp +++ b/src/expand.cpp @@ -41,7 +41,7 @@ expand_fn(PEnv& penv, const AST* exp, void* arg) THROW_IF(++a == tup->end(), exp->loc, "Unexpected end of `fn' form"); THROW_IF(!(*a)->to_tuple(), (*a)->loc, "First argument of `fn' is not a list"); const ATuple* prot = (*a++)->to_tuple(); - List ret(new ATuple(penv.sym("fn"), NULL, exp->loc)); + List ret(new ATuple(penv.sym("lambda"), NULL, exp->loc)); ret.push_back(prot); while (a != tup->end()) ret.push_back(penv.expand(*a++)); @@ -67,7 +67,7 @@ expand_def(PEnv& penv, const AST* exp, void* arg) argsExp.head->loc = exp->loc; List fnExp; - fnExp.push_back(penv.sym("fn")); + fnExp.push_back(penv.sym("lambda")); fnExp.push_back(argsExp.head); for (++i; i != tup->end(); ++i) fnExp.push_back(*i); @@ -94,9 +94,9 @@ PEnv::expand(const AST* exp) THROW_IF(tup->empty(), exp->loc, "Call to empty list"); - if (is_form(tup, "def")) + if (is_form(tup, "define")) return expand_def(*this, exp, NULL); - else if (is_form(tup, "fn")) + else if (is_form(tup, "lambda")) return expand_fn(*this, exp, NULL); else return expand_list(*this, tup); |