|
|
|
@ -11,9 +11,13 @@ static Pointer run_fn(Func fn, Pointer params) {
@@ -11,9 +11,13 @@ static Pointer run_fn(Func fn, Pointer params) {
|
|
|
|
|
|
|
|
|
|
env = cons(tbl, env); |
|
|
|
|
while(args != NIL && params != NIL) { |
|
|
|
|
table_set(tbl, CAR(args), CAR(params)); |
|
|
|
|
args = CDR(args); |
|
|
|
|
params = CDR(params); |
|
|
|
|
if (CAR(args) == BODY && CAR(CDR(args)) != NIL) { |
|
|
|
|
table_set(tbl, CAR(CDR(args)), params); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
table_set(tbl, CAR(args), CAR(params)); |
|
|
|
|
args = CDR(args); |
|
|
|
|
params = CDR(params); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
REDUCE(body, eval(CAR(body), env), value); |
|
|
|
|