let*-values -- r7rs Definition syntax;
let*-values (from vonuvoli);Syntax keywords:
variable: identifier;initializer: identifier;binding: pattern with variants:
((variable |...|) initializer);bindings: pattern with variants:
();(binding |...|);expression: expression;Syntax variants:
(_ bindings)(_ bindings expression |...|)scheme:base -- (scheme base);scheme -- (scheme);(let*-values <mv-binding-spec> <body>)Syntax:
<Mv-binding-spec>has the form((<formals> <init>) ...)and
<body>is a sequence of zero or more definitions followed by one or more expressions as described in sectionlambda. In each<formals>, it is an error if any variable appears more than once.Semantics: The
let*-valuesconstruct is similar tolet-values, but the<init>s are evaluated and bindings created sequentially from left to right, with the region of the bindings of each<formals>including the<init>s to its right as well as<body>. Thus the second<init>is evaluated in an environment in which the first set of bindings is visible and initialized, and so on.(let ((a 'a) (b 'b) (x 'x) (y 'y)) (let*-values (((a b) (values x y)) ((x y) (values a b))) (list a b x y))) ===> (x y x y)
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.