summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-06-21 20:02:40 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-06-21 20:02:40 -0700
commitff9db4f3a6ee2a2bb5c821b73d59ffe792cbbc27 (patch)
tree4bddaf493f2d9a03e064ebe0ade3c5555bbcc1fa /txr.1
parentd0ffb09d01edbc28002520104865117894ef5fa9 (diff)
downloadtxr-ff9db4f3a6ee2a2bb5c821b73d59ffe792cbbc27.tar.gz
txr-ff9db4f3a6ee2a2bb5c821b73d59ffe792cbbc27.tar.bz2
txr-ff9db4f3a6ee2a2bb5c821b73d59ffe792cbbc27.zip
* lisplib.c (ifa_set_entries): Add conda.
* share/txr/stdlib/ifa.tl (conda): New macro. * tests/012/ifa.tl: Adding test for conda. * txr.1: Documenting conda.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.134
1 files changed, 34 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index e3a61513..f043344d 100644
--- a/txr.1
+++ b/txr.1
@@ -10941,6 +10941,40 @@ form.
-> (4)
.cble
+.coNP Macro @ conda
+.synb
+.mets (conda >> {( test << form *)}*)
+.syne
+.desc
+The
+.code conda
+operator provides a multi-branching conditional evaluation of
+forms, similarly to the
+.code cond
+operator. Enclosed in the cond form are groups of forms expressed as lists.
+Each group must be a list of at least one form.
+
+The
+.code conda
+operator is anaphoric: it expands into a nested structure of zero or more
+.code ifa
+invocations, according to these patterns:
+
+.cble
+ (conda) -> nil
+ (conda (x y ...) ...) -> (ifa x (progn y ...) (conda z ...))
+.cblk
+
+Thus,
+.code conda
+inherits all the restrictions on the
+.meta test
+expressions from
+.codn ifa ,
+as well as the anaphoric
+.code it
+variable feature.
+
.coNP Macro @ dotimes
.synb
.mets (dotimes >> ( var < count-form <> [ result-form ]) << body-form *)