summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-02-04 07:05:10 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-02-04 07:05:10 -0800
commit726fc85294c3e9954587f7c70e1f8776102d282a (patch)
tree544221b88c3f08840de9fdca7cc2f6cdf8a27847
parent8132c60cdb613e27eb2b8e58b8d1ea9ae01a615c (diff)
downloadtxr-726fc85294c3e9954587f7c70e1f8776102d282a.tar.gz
txr-726fc85294c3e9954587f7c70e1f8776102d282a.tar.bz2
txr-726fc85294c3e9954587f7c70e1f8776102d282a.zip
doc: param macros: missing return value requirements.
* txr.1: Document return value convention of parameter list transformers, without which it can only be deduced from the example.
-rw-r--r--txr.114
1 files changed, 14 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 1b9a672a..0305ef39 100644
--- a/txr.1
+++ b/txr.1
@@ -37039,6 +37039,16 @@ or
.code lambda
form. This is intended for error reporting.
+A parameter transformer returns the transformed parameter list and body as a
+single object: a list whose first element is the parameter list,
+and whose remaining elements are the forms of the body. Thus, the following
+is a correct null transformer:
+
+.verb
+ (lambda (params body env form)
+ (cons params body))
+.brev
+
.coNP Macro @ define-param-expander
.synb
.mets (define-param-expander < name >> ( pvar < bvar : < evar << fvar )
@@ -37086,6 +37096,10 @@ The
form returns
.metn name .
+The parameter macro returns the transformed parameter list and body as a
+single object: a list whose first element is the parameter list,
+and whose remaining elements are the forms of the body.
+
.TP* Example:
The following example shows the implementation