From 726fc85294c3e9954587f7c70e1f8776102d282a Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 4 Feb 2021 07:05:10 -0800 Subject: 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. --- txr.1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'txr.1') 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 -- cgit v1.2.3