summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-03-21 19:18:25 -0700
committerKaz Kylheku <kaz@kylheku.com>2025-03-21 19:18:25 -0700
commit6150969202829d267ad1108c87b5edf6674d0eac (patch)
treec7ca8a1590d79b9335576a5ad88a49e3ce0ce162
parent217bb7e691856e16f0b7490d6acbf715223b3a13 (diff)
downloadtxr-6150969202829d267ad1108c87b5edf6674d0eac.tar.gz
txr-6150969202829d267ad1108c87b5edf6674d0eac.tar.bz2
txr-6150969202829d267ad1108c87b5edf6674d0eac.zip
doc: document that let allows (var).
TXR Lisp's let and let* support var, (var) and (var init-form), exactly like Common Lisp, and this has been the case for a very long time. The (var) variant is now documented. * txr.1: Show the init-form in square brackets, making it clear that it's optional. Mention the (sym) variant in the documentation below.
-rw-r--r--txr.116
1 files changed, 12 insertions, 4 deletions
diff --git a/txr.1 b/txr.1
index 766279f5..f21ea8ac 100644
--- a/txr.1
+++ b/txr.1
@@ -15162,8 +15162,8 @@ or
.coNP Operators @ let and @ let*
.synb
-.mets (let >> ({ sym | >> ( sym << init-form )}*) << body-form *)
-.mets (let* >> ({ sym | >> ( sym << init-form )}*) << body-form *)
+.mets (let >> ({ sym | >> ( sym <> [ init-form ])}*) << body-form *)
+.mets (let* >> ({ sym | >> ( sym <> [ init-form ])}*) << body-form *)
.syne
.desc
The
@@ -15176,7 +15176,10 @@ evaluate forms in that scope. The operator symbol, either
or
.codn let* ,
is followed by a list which can contain any mixture of
-.meta sym
+.metn sym ,
+.mono
+.meti <> ( sym )
+.onom
or
.mono
.meti >> ( sym << init-form )
@@ -15199,7 +15202,12 @@ evaluation of
The plain
.meta sym
variant specifies a variable which is initialized to
-.codn nil .
+.codn nil ,
+as does the
+.mono
+.meti <> ( sym )
+.onom
+variant.
The
.metn init-form s
are evaluated in order, by both