chickadee » scheme » base » define-values

(define-values <formals> <expression>)syntax

It is an error if a variable appears more than once in the set of <formals>.

Semantics: <Expression> is evaluated, and the <formals> are bound to the return values in the same way that the <formals> in a lambda expression are matched to the arguments in a procedure call.

{{ (define-values (x y) (exact-integer-sqrt 17)) (list x y) ==> (4 1)

(let ()

 (define-values (x y) (values 1 2))
 (+ x y))      ==> 3

}}