From be33b1a39c98a8f4e143f597eb5fc36a7773826d Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt Date: Fri, 11 Aug 2000 00:44:36 +0000 Subject: [PATCH] * receive.scm, srfi-8.scm: New files. --- ice-9/receive.scm | 29 +++++++++++++++++++++++++++++ ice-9/srfi-8.scm | 0 2 files changed, 29 insertions(+) create mode 100644 ice-9/receive.scm create mode 100644 ice-9/srfi-8.scm diff --git a/ice-9/receive.scm b/ice-9/receive.scm new file mode 100644 index 000000000..148db2821 --- /dev/null +++ b/ice-9/receive.scm @@ -0,0 +1,29 @@ +;;;; SRFI-8 + +;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;; +;;; This program is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU General Public License as +;;; published by the Free Software Foundation; either version 2, or +;;; (at your option) any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this software; see the file COPYING. If not, write to +;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330, +;;; Boston, MA 02111-1307 USA + +(define-module (ice-9 receive) + :export (receive) + :no-backtrace + ) + +(define receive + (procedure->memoizing-macro + (lambda (exp env) + `(call-with-values (lambda () ,(caddr exp)) + (lambda ,(cadr exp) ,@(cdddr exp)))))) diff --git a/ice-9/srfi-8.scm b/ice-9/srfi-8.scm new file mode 100644 index 000000000..e69de29bb