[plt-scheme] about letrec and continuation : which behavior is correct ? and why ?

From: Andre Mayers (andre.mayers at usherbrooke.ca)
Date: Tue Aug 19 09:15:03 EDT 2008

At the end of section 3.4 of "Sketchy LISP : An Introduction to Functional
Programming in Scheme"
http://t3x.org/sketchy/vol1/sl20.html

we have
 
(letrec ((x (call/cc list)))
  (if (pair? x)
      ((car x) (lambda () x))
      (pair? (x))))
=> #f

but with drscheme we have 

Bienvenue dans DrScheme, version 4.1 [3m].
Langage: Module; memory limit: 256 megabytes.
> (letrec ((x (call/cc list)))
  (if (pair? x)
      ((car x) (lambda () x))
      (pair? (x))))
#t
>

André Mayers, Ph.D., M. Ps.
professeur agrégé
Département d'informatique
Université de Sherbrooke
Sherbrooke (Québec) Canada J1K 2R1
tél: +1 819-821-8000 poste 62041
fax: +1 819-821-8200
andre.mayers at usherbrooke.ca
http://www.dmi.usherb.ca/~amayers





Posted on the users mailing list.