summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-11-05 07:48:49 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-11-05 07:48:49 -0800
commit34cb933b006c52eec59dba4478a0d04c8ae4e5ba (patch)
tree0b123cfc9d180c8e35885d5a7efd302adbb6959e
parente313ceee48d860d3ee9591298c9ac1630096610b (diff)
downloadtxr-34cb933b006c52eec59dba4478a0d04c8ae4e5ba.tar.gz
txr-34cb933b006c52eec59dba4478a0d04c8ae4e5ba.tar.bz2
txr-34cb933b006c52eec59dba4478a0d04c8ae4e5ba.zip
* lib.c (iff): Bugfix: forgotten handling of default
argument, resulting in : symbol being called as a function. * txr.1: Removing description of situation when the then-function argument of iff or iffi is specified as nil. This is deprecated behavior which can be obtained by using the false function.
-rw-r--r--ChangeLog9
-rw-r--r--lib.c1
-rw-r--r--txr.110
3 files changed, 11 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index f78f1cf8..97693d32 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-11-05 Kaz Kylheku <kaz@kylheku.com>
+
+ * lib.c (iff): Bugfix: forgotten handling of default
+ argument, resulting in : symbol being called as a function.
+
+ * txr.1: Removing description of situation when the then-function
+ argument of iff or iffi is specified as nil. This is deprecated
+ behavior which can be obtained by using the false function.
+
2014-10-31 Kaz Kylheku <kaz@kylheku.com>
New macros tb and tc.
diff --git a/lib.c b/lib.c
index 663831cc..4674ff26 100644
--- a/lib.c
+++ b/lib.c
@@ -4612,6 +4612,7 @@ static val do_iff(val env, val args)
val iff(val condfun, val thenfun, val elsefun)
{
+ elsefun = default_bool_arg(elsefun);
return func_f0v(cons(condfun, cons(thenfun, elsefun)), do_iff);
}
diff --git a/txr.1 b/txr.1
index 59241881..165848b1 100644
--- a/txr.1
+++ b/txr.1
@@ -20651,16 +20651,8 @@ resulting value is returned. Otherwise the arguments are passed to
and the resulting value is returned.
If
-.meta then-func
-needs to be called, but is
-.codn nil ,
-then
-.code nil
-is returned immediately. Likewise, if
.meta else-func
-needs to be called, but is omitted or
-.codn nil ,
-then
+needs to be called, but is omitted, then
.code nil
is returned.