From 8466d8cfa486fb30d1755c4261b781135083787b Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 20 Feb 2017 00:05:29 -0800 Subject: Import Upstream version 3a1 --- promise.scm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'promise.scm') diff --git a/promise.scm b/promise.scm index f38aebf..44ffea1 100644 --- a/promise.scm +++ b/promise.scm @@ -1,5 +1,5 @@ ;;;"promise.scm" promise for force and delay -;;; From Revised^4 Report on the Algorithmic Language Scheme +;;; From Revised^5 Report on the Algorithmic Language Scheme ;;; Editors: William Clinger and Jonathon Rees ; ; We intend this report to belong to the entire Scheme community, and so @@ -7,9 +7,9 @@ ; particular, we encourage implementors of Scheme to use this report as ; a starting point for manuals and other documentation, modifying it as ; necessary. - -(define promise:force (lambda (object) (object))) - +;@ +(define force (lambda (object) (object))) +;@ (define make-promise (lambda (proc) (let ((result-ready? #f) @@ -23,7 +23,10 @@ (begin (set! result-ready? #t) (set! result x) result)))))))) - ;;; change occurences of (DELAY ) to ;;; (MAKE-PROMISE (LAMBDA () )) -;;; and (define force promise:force) +;@ +(define-syntax delay + (syntax-rules () + ((delay expression) + (make-promise (lambda () expression))))) -- cgit v1.2.3