racket/collects/srfi/8/receive.ss
Eli Barzilay 572b7f1401 reformatting
svn: r8652
2008-02-13 20:17:26 +00:00

21 lines
678 B
Scheme

;;;
;;; <receive.ss> ---- SRFI 8 Binding to Multiple Values port to PLT Scheme
;;; Time-stamp: <02/05/10 12:22:37 solsona>
;;;
;;; Usually, I would add a copyright notice, and the announce that
;;; this code is under the LGPL licence. Nevertheless, I only did the
;;; port to PLT Scheme v200 (it was written for the 103), and here is
;;; the copyright notice, comments, and licence from the original
;;; source:
;;;
;;; oh well, there is no such comment.
#lang mzscheme
(provide receive)
;; (receive vars producer . body)
(define-syntax receive
(syntax-rules ()
((receive ?vars ?producer . ?body)
(call-with-values (lambda () ?producer) (lambda ?vars . ?body)))))