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