summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-11-06 06:35:34 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-11-06 06:35:34 -0800
commit6cd6af985619569e7e12df7b28c6aa1dc10726c1 (patch)
treef6b64a6bbb70fb630329922a54e470538934876f /eval.c
parent34cb933b006c52eec59dba4478a0d04c8ae4e5ba (diff)
downloadtxr-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index aab5a683..402d19a2 100644
--- a/eval.c
+++ b/eval.c
@@ -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));