call-with-values -- r7rs Definition procedure;
call-with-values (from vonuvoli);Procedure variants:
(((producer procedure) (consumer procedure)) -> (any))
scheme:base -- (scheme base);scheme -- (scheme);(call-with-values producer consumer)Calls its
producerargument with no arguments and a continuation that, when passed some values, calls theconsumerprocedure with those values as arguments. The continuation for the call toconsumeris the continuation of the call tocall-with-values.(call-with-values (lambda () (values 4 5)) (lambda (a b) b)) ===> 5 (call-with-values * -) ===> -1
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.