Guile Mailing List Archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: receive



>>>>> "ks" == Klaus Schilling <Klaus.Schilling@home.ivm.de> writes:

  ks> I'm trying to get the reference implementation of Olin Shivers'
  ks> list utilities to run as guile module. It uses a special
  ks> syntactic construct named `receive'. Anyone know how to
  ks> translate it into something guile understands? It seems to be
  ks> related to values and call-with-values.

The original definition (from scsh, so its copyright applies) is

   (define-syntax receive
     (syntax-rules ()
       ((receive (?var ...) ?producer . ?body)
        (call-with-values (lambda () ?producer)
          (lambda (?var ...)
            (note-name! ?var '?var) ...
            (let () . ?body))))))

-- 
An athiest is a man with no invisible means of support
-- John Buchan

Guile Home | Main Index | Thread Index