diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-03-21 23:24:40 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-03-22 11:52:56 -0700 |
commit | 654a913f119664bce805fb2da94bcee0349ab7fb (patch) | |
tree | da63867f8ec40ab0818851139b2491841027baf4 /txr.1 | |
parent | 3e17fb079dcecebded6e7d8c834b918d9a3b541a (diff) | |
download | txr-654a913f119664bce805fb2da94bcee0349ab7fb.tar.gz txr-654a913f119664bce805fb2da94bcee0349ab7fb.tar.bz2 txr-654a913f119664bce805fb2da94bcee0349ab7fb.zip |
* eval.c (me_when): New static function.
(eval_init): Register "when" macro.
* txr.1: Documented when macro.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -5580,6 +5580,21 @@ If the first form of a group yields nil, then processing continues with the next group, if any. If all form groups yield nil, then the cond form yields nil. This holds in the case that the syntax is empty: (cond) yields nil. +.SS Macro when + +.TP +Syntax: + + (when <expression> {<form>}*) + +.TP +Description: + +The when macro operator evaluates <expression>. If <expression> yields +true, and there are additiona forms, then each <form> is evaluated. +The value of the last form is becomes the result value of the when form. +If there are no forms, then the result is nil. + .SS Operator/function if .TP |