diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-01-10 23:36:37 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-01-10 23:36:37 -0800 |
commit | 54599a32a30ee276e4a26b20049ac2c79b6057c9 (patch) | |
tree | b4edb94960fb8e4fad8d0864b2a4be6bee36d00b /eval.c | |
parent | 08e356af25f0e6ab9c8ad1583181aa529c61ca91 (diff) | |
download | txr-54599a32a30ee276e4a26b20049ac2c79b6057c9.tar.gz txr-54599a32a30ee276e4a26b20049ac2c79b6057c9.tar.bz2 txr-54599a32a30ee276e4a26b20049ac2c79b6057c9.zip |
* eval.c (generate): Bugfix: do not call gen_fun before
testing while_pred.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1314,10 +1314,10 @@ static val generate_func(val env, val lcons) static val generate(val while_pred, val gen_fun) { - val first_item = funcall(gen_fun); if (!funcall(while_pred)) { return nil; } else { + val first_item = funcall(gen_fun); val lc = make_lazy_cons(func_f1(cons(while_pred, gen_fun), generate_func)); rplaca(lc, first_item); return lc; |