summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-08-08 07:50:07 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-08-08 07:50:07 -0700
commit76038c7dbbecd97f4943dcca99deb2d095425fa5 (patch)
tree78e9d497120e3f210fc8183ca7330660b7a9a93e /eval.c
parent508fbb28b53a6dd0d3b4b21cfffe21a4c11e88d0 (diff)
downloadtxr-76038c7dbbecd97f4943dcca99deb2d095425fa5.tar.gz
txr-76038c7dbbecd97f4943dcca99deb2d095425fa5.tar.bz2
txr-76038c7dbbecd97f4943dcca99deb2d095425fa5.zip
Bugfix: ret operator does not generate functions
that take any number of arguments. * eval.c (me_ret): Generate (op identity (progn @rest <expr>)) rather than of (op identity <expr>). * txr.1: Update misleading equivalence.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index c66ddbef..d9f1c51d 100644
--- a/eval.c
+++ b/eval.c
@@ -2539,7 +2539,9 @@ static val me_ido(val form, val menv)
static val me_ret(val form, val menv)
{
- return cons(op_s, cons(identity_s, rest(form)));
+ return list(op_s, identity_s, cons(progn_s,
+ cons(list(var_s, rest_s, nao),
+ rest(form))), nao);
}
static val me_flet_labels(val form, val menv)