diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-11-06 06:35:34 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-11-06 06:35:34 -0800 |
commit | 6cd6af985619569e7e12df7b28c6aa1dc10726c1 (patch) | |
tree | f6b64a6bbb70fb630329922a54e470538934876f /eval.c | |
parent | 34cb933b006c52eec59dba4478a0d04c8ae4e5ba (diff) | |
download | txr-6cd6af985619569e7e12df7b28c6aa1dc10726c1.tar.gz txr-6cd6af985619569e7e12df7b28c6aa1dc10726c1.tar.bz2 txr-6cd6af985619569e7e12df7b28c6aa1dc10726c1.zip |
Allow then-func to be omitted in iff. Cleanup.
* eval.c (eval_init): Register iff as requiring only one arg.
* lib.c (do_iff): Do not check thenfun for nil. Just call it.
(iff): Default thenfun to identity.
* txr.1: Documentation updated.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3749,7 +3749,7 @@ void eval_init(void) reg_fun(intern(lit("andf"), user_package), func_n0v(andv)); reg_fun(intern(lit("orf"), user_package), func_n0v(orv)); reg_fun(intern(lit("notf"), user_package), func_n1(notf)); - reg_fun(intern(lit("iff"), user_package), func_n3o(iff, 2)); + reg_fun(intern(lit("iff"), user_package), func_n3o(iff, 1)); reg_fun(intern(lit("iffi"), user_package), func_n3o(iffi, 2)); reg_fun(intern(lit("if"), user_package), func_n3o(if_fun, 2)); reg_fun(intern(lit("or"), user_package), func_n0v(or_fun)); |