parameterize

Joo ChurlSoo <[email protected]> Sat, 15 Jan 2011 10:34:38 +0100
Newsgroups gmane.lisp.scheme.scheme48
Message-ID <[email protected]>
 * From: Michael Sperber <[email protected]>
 * Date: Fri, 14 Jan 2011 08:23:58 +0100
 * Subj: Re: parameterize

 | Joo ChurlSoo <[email protected]> writes:
   >> The following seems to be a bug.

 | Could you elaborate?  I enjoy analyzing intricate uses of
 | `call-with-current-continuation' as much as the next person, but am a
 | little short on time right now.

(cf.)
(let ((go #f)
      (alist '()))
  (let ((a 1) (b 2))
    (call-with-current-continuation (lambda (x) (set! go x) 3))
    (set! alist (cons (cons a b) alist))
    (set! a 100)
    (set! alist (cons (cons a b) alist))
    (if (< (length alist) 3)
	(go 3)
	(reverse alist))))

((1 . 2) (100 . 2) (100 . 2) (100 . 2))

(let ((go #f)
      (alist '()))
  (let ((a 1) (b (call-with-current-continuation (lambda (x) (set! go x) 2))))
    (set! alist (cons (cons a b) alist))
    (set! a 100)
    (set! alist (cons (cons a b) alist))
    (if (< (length alist) 3)
	(go 2)
	(reverse alist))))

((1 . 2) (100 . 2) (1 . 2) (100 . 2))

 | -- 
 | Cheers =8-} Mike
 | Friede, Völkerverständigung und überhaupt blabla

-- 
Joo ChurlSoo