diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-08-30 02:29:09 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-08-30 02:29:09 -0700 |
commit | 793a7f441019b6788c260621f2e6e7a42899da21 (patch) | |
tree | aa81f81ebce406a68a4a0273653e020d9a3e33a5 /eval.c | |
parent | 05ebefa3edfb2cf6dfd478c96630f49ced30845c (diff) | |
download | txr-793a7f441019b6788c260621f2e6e7a42899da21.tar.gz txr-793a7f441019b6788c260621f2e6e7a42899da21.tar.bz2 txr-793a7f441019b6788c260621f2e6e7a42899da21.zip |
* eval.c (eval_intrinsic): Bugfix: take the expanded form instead
of throwing it away.
(expand): Recurse into expand_place for (set ...) forms.
* txr.1: Documented eval.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -393,7 +393,7 @@ val interp_fun(val env, val fun, val args) static val eval_intrinsic(val form, val env) { uses_or2; - expand(form); + form = expand(form); return eval(form, or2(env, make_env(nil, nil, env)), form); } @@ -1643,7 +1643,7 @@ val expand(val form) if (body == body_ex) return form; return rlcp(cons(sym, cons(name, cons(args, body_ex))), form); - } else if (sym == inc_s || sym == dec_s) { + } else if (sym == set_s || sym == inc_s || sym == dec_s) { val place = second(form); val inc = third(form); val place_ex = expand_place(place); |