From 8750696e1781d2c6fc7f1a4ce5992965bae9e85e Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Sun, 19 Nov 2017 18:43:37 -0500 Subject: [PATCH] cleanup --- scheme/base.sld | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scheme/base.sld b/scheme/base.sld index c13cde79..b2a18334 100644 --- a/scheme/base.sld +++ b/scheme/base.sld @@ -530,19 +530,15 @@ (lambda (expr rename compare) (apply error (cdr expr))))) - ;; TODO: The whitespace characters are space, tab, line feed, form feed (not in parser yet), and carriage return. (define call-with-current-continuation call/cc) - ;; TODO: this is from r7rs, but is not really good enough by itself - ;(define (values . things) - ; (call/cc - ; (lambda (cont) (apply cont things)))) + + ;; Extended from r7rs definition to work in our Scheme (define values (lambda args (if (and (not (null? args)) (null? (cdr args))) (car args) (cons (cons 'multiple 'values) args)))) - ;; TODO: just need something good enough for bootstrapping (for now) - ;; does not have to be perfect (this is not, does not handle call/cc or exceptions) + (define call-with-values (lambda (producer consumer) (let ((x (producer)))