[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] Another bug from the net
From: |
John Cowan |
Subject: |
Re: [Chicken-hackers] Another bug from the net |
Date: |
Tue, 21 Jul 2009 12:06:10 -0400 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Thomas Bushnell BSG scripsit:
> 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.
Same results in Chicken 4.
> (letrec ((x (call/cc list)) (y (call/cc list)))
> (cond ((procedure? x) (x (pair? y)))
> ((procedure? y) (y (pair? x))))
> (let ((x (car x)) (y (car y)))
> (and (call/cc x) (call/cc y) (call/cc x))))
>
> Should return #t, but it returns #f in Chicken 3.4.
Also the same results in Chicken 4.
--
Her he asked if O'Hare Doctor tidings sent from far John Cowan
coast and she with grameful sigh him answered that http://ccil.org/~cowan
O'Hare Doctor in heaven was. Sad was the man that word address@hidden
to hear that him so heavied in bowels ruthful. All
she there told him, ruing death for friend so young, James Joyce, Ulysses
algate sore unwilling God's rightwiseness to withsay. "Oxen of the Sun"