From 6150969202829d267ad1108c87b5edf6674d0eac Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 21 Mar 2025 19:18:25 -0700 Subject: 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. --- txr.1 | 16 ++++++++++++---- 1 file 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 -- cgit v1.2.3