This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]