[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] Another bug from the net
From: |
Alex Shinn |
Subject: |
Re: [Chicken-hackers] Another bug from the net |
Date: |
Sat, 25 Jul 2009 21:38:40 +0900 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin) |
Thomas Bushnell BSG <address@hidden> writes:
> Chicken gets this wrong:
>
> (let ((cont #f))
> (letrec ((x (call-with-current-continuation (lambda (c) (set! cont c) 0)))
> (y (call-with-current-continuation (lambda (c) (set! cont c) 0))))
> (if cont
> (let ((c cont))
> (set! cont #f)
> (set! x 1)
> (set! y 1)
> (c 0))
> (+ x y))))
>
> Should be 0, but I get 1 in Chicken 3.4.
This has come up before, but it is actually debatable, and I
contend that the above is a perfectly valid interpretation
of R5RS. See the following thread:
http://lists.gnu.org/archive/html/chicken-hackers/2008-02/msg00020.html
specifically
http://lists.gnu.org/archive/html/chicken-hackers/2008-02/msg00026.html
--
Alex