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

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Aug 20 22:41:03 EDT 2008

On Aug 20, Matthias Felleisen wrote:
> 
> On Aug 20, 2008, at 2:27 PM, Joe Marshall wrote:
> 
> > Which, frankly, is a better way of writing this than the letrec
> > because it is obvious that some side-effecting is going on in
> > order to create magic circular structure such that
> > (eq? x ((car x))) could evaluate to #t.
> 
> Amen. 

(negated Amen).

Not only do I like not doing an explicit side effect -- I'd go further
and merge the `shared' functionality into `letrec', just to make it
*really* usable for data too.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.