From ff9db4f3a6ee2a2bb5c821b73d59ffe792cbbc27 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 21 Jun 2015 20:02:40 -0700 Subject: * 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. --- txr.1 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'txr.1') 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 *) -- cgit v1.2.3