[r6rs-discuss] [Formal] SRFI-39 should be made an R6RS library

From: Abdulaziz Ghuloum <aghuloum>
Date: Wed Feb 21 06:23:15 2007

On Feb 20, 2007, at 11:05 PM, John Cowan wrote:

> Apparently, Chicken requires
> parameter procedures to return only one value.

So does Chez. In the following, using the procedure "values" as a guard
is a shorthand for (lambda (x) x) since returning multiple values to a
single-value context raises an error in Chez.

   (define make-parameter
     (case-lambda
       [(init guard)
        (let ([v (guard init)])
          (case-lambda
            [() v]
            [(u) (set! v (guard u))]))]
       [(init) (make-parameter init values)]))

Aziz,,,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.r6rs.org/pipermail/r6rs-discuss/attachments/20070221/8b607c25/attachment.htm
Received on Wed Feb 21 2007 - 06:22:43 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC