diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2013-10-06 23:56:02 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2013-10-06 23:56:02 -0700 |
commit | 17c8e76951ea9dc407f07bf2173e8f60ac5efd80 (patch) | |
tree | f235f35ec09cf0c82ec6477e94db6fb5edc8038f /lib.c | |
parent | 7c8c8d326bbb8b9725efa6a3c364d3426a7cdca9 (diff) | |
download | txr-17c8e76951ea9dc407f07bf2173e8f60ac5efd80.tar.gz txr-17c8e76951ea9dc407f07bf2173e8f60ac5efd80.tar.bz2 txr-17c8e76951ea9dc407f07bf2173e8f60ac5efd80.zip |
Improving behavior of op and fixing a bug.
Explicitly specifying @rest using (op ... . @rest)
did not work at all.
The then-func agument of iff and iffi may now be nil.
* eval.c (format_op_arg): New static function.
(transform_op): Handle dotted lists ending in @rest
or @<num>.
(supplement_op_syms): New static function.
(expand_op): Add missing numeric arguments,
so that all 1 through n are in the list.
Trailing rest is now added under different
conditions.
* lib.c (do_iff): Give thenfun the same
behavior on nil that elsefun enjoys.
* txr.1: Updated.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3375,7 +3375,7 @@ static val do_iff(val env, val args) cons_bind (thenfun, elsefun, choices); return if3(apply(condfun, args, nil), - apply(thenfun, args, nil), + if2(thenfun, apply(thenfun, args, nil)), if2(elsefun, apply(elsefun, args, nil))); } |