~ chicken-core (chicken-5) 63951bf423e828473f83bcb01ce871a050da4d6f
commit 63951bf423e828473f83bcb01ce871a050da4d6f Author: felix <felix@call-with-current-continuation.org> AuthorDate: Fri Aug 5 07:42:37 2011 -0400 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Fri Aug 5 07:42:37 2011 -0400 updated manual for optional-argument macros diff --git a/manual/Non-standard macros and special forms b/manual/Non-standard macros and special forms index 295b23ae..f14984d3 100644 --- a/manual/Non-standard macros and special forms +++ b/manual/Non-standard macros and special forms @@ -71,8 +71,7 @@ This implementation of {{require-extension}} is compliant with [[http://srfi.sch Use this form for procedures that take a single optional argument. If {{ARGS}} is the empty list {{DEFAULT}} is evaluated and -returned, otherwise the first element of the list {{ARGS}}. It is -an error if {{ARGS}} contains more than one value. +returned, otherwise the first element of the list {{ARGS}}. <enscript highlight=scheme> (define (incr x . i) (+ x (optional i 1))) @@ -112,8 +111,7 @@ be a rest-parameter taken from a lambda-list. {{let-optionals}} binds {{VAR1 ...}} to available arguments in parallel, or to {{DEFAULT1 ...}} if not enough arguments were provided. {{let-optionals*}} binds {{VAR1 ...}} sequentially, so every -variable sees the previous ones. it is an error if any excess -arguments are provided. +variable sees the previous ones. <enscript highlight=scheme> (let-optionals '(one two) ((a 1) (b 2) (c 3)) @@ -130,8 +128,7 @@ binds {{VAR1 ...}} to available arguments in parallel, or to {{DEFAULT1 ...}} if not enough arguments were provided. {{let-optionals*}} binds {{VAR1 ...}} sequentially, so every variable sees the previous ones. If a single variable {{RESTVAR}} -is given, then it is bound to any remaining arguments, otherwise it is -an error if any excess arguments are provided. +is given, then it is bound to any remaining arguments. <enscript highlight=scheme> (let-optionals* '(one two) ((a 1) (b 2) (c a))Trap