[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.15.4 Multiple values

Function: values obj ...
[R5RS] Returns obj ... as multiple values. Caller can capture multiple values by a built-in syntax receive (4.6 Binding constructs), or the R5Rs procedure call-with-values described below. See also 10.6 srfi-11 - Let-values.
 
(values 1 2) => 1 and 2

Function: call-with-values producer consumer
[R5RS] Call a procedure producer with no argument. Then applies a procedure consumer on the value(s) producer returned. Returns the value(s) consumer returns.
 
(call-with-values (lambda () (values 1 2)) cons)
  => (1 . 2)



This document was generated by Ken Dickey on November, 28 2002 using texi2html