commit f139a4bb434b107e894dbd441df93a225de6a3f7
parent d6d4cc2361943c0755d54697daa53a12ef866e63
Author: Wolfgang Corcoran-Mathe <wcm@sigwinch.xyz>
Date: Thu, 1 Feb 2024 15:16:00 -0500
case-lambda: Add deffn etc.
Diffstat:
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/doc/r7rs-small/derived/case-lambda.texinfo b/doc/r7rs-small/derived/case-lambda.texinfo
@@ -1,14 +1,15 @@
@node Case-lambda
@subsection Case-lambda
-case-lambda library syntax: (case-lambda @svar{clause} @dots{})
+@deffn {library syntax case-lambda @svar{clause}@dots{}
-Syntax: Each @svar{clause} is of the form (@svar{formals} @svar{body}), where @svar{formals} and @svar{body}
-have the same syntax as in a lambda expression.
+Syntax: Each @svar{clause} is of the form
+@code{(}@svar{formals} @svar{body}@code{)}, where @svar{formals} and @svar{body}
+have the same syntax as in a @code{lambda} expression.
-Semantics: A case-lambda expression evaluates to a procedure that accepts a variable
+Semantics: A @code{case-lambda} expression evaluates to a procedure that accepts a variable
number of arguments and is lexically scoped in the same manner as a procedure resulting
-from a lambda expression. When the procedure is called, the first @svar{clause} for which the
+from a @code{lambda} expression. When the procedure is called, the first @svar{clause} for which the
arguments agree with @svar{formals} is selected, where agreement is specified as for the
@svar{formals} of a lambda expression. The variables of @svar{formals} are bound to fresh
locations, the values of the arguments are stored in those locations, the @svar{body} is
@@ -28,3 +29,5 @@ It is an error for the arguments not to agree with the @svar{formals} of any @sv
(range 3) @result{} (0 1 2)
(range 3 5) @result{} (3 4)
@end example
+
+@end deffn