On Tue, Jul 31, 2012 at 03:24:16PM +0200, Thomas Chust wrote: > On Tue, 31 Jul 2012, Jeronimo Pellegrini wrote: > >I was wondering why this happens in Chicken (recent checkout from git): > > > >(let ((lst (call/cc (lambda (x) > > (print 'something) > > (call/cc (lambda (y) > > (list x y))))))) > > (print lst) > > (print (eq? (car lst) (cadr lst))) > > (print (eqv? (car lst) (cadr lst))) > > this is really strange! > > Since the second lambda expression is in tail position with respect to the > first, the two continuations x and y are actually equivalent, so at first > I was less surprised by their printed representation than by the results > of the equality predicates.
Same here. I think what we're seeing here is the same procedure but different closure objects (one has access to 'x', the other to 'y'). Only the procedure name is printed. Cheers, Peter -- http://sjamaan.ath.cx -- "The process of preparing programs for a digital computer is especially attractive, not only because it can be economically and scientifically rewarding, but also because it can be an aesthetic experience much like composing poetry or music." -- Donald Knuth _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users