chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] similar letrec issue


From: Thomas Bushnell BSG
Subject: [Chicken-hackers] similar letrec issue
Date: Tue, 21 Jul 2009 00:28:22 -0700

This is likely the same bug in a different test case (also from
http://sisc-scheme.org/r5rs_pitfall.scm):

(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.

On the other hand, Chicken Scheme gets this one right:

(letrec ((x (call-with-current-continuation
                  (lambda (c)
                    (list #T c)))))
      (if (car x)
          ((cadr x) (list #F (lambda () x)))
          (eq? x ((cadr x)))))

should return #t, and it does.

Thomas






reply via email to

[Prev in Thread] Current Thread [Next in Thread]