Hello,

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)))

==>
(#<procedure (f_10734 . results1838)> #<procedure (f_10734 . results1838)>)
#f
#f

The procedures returned are different continuations (and of course
they are certainly not eq? or eqv?). So I was wondering, then, why print
(and write, etc) show the same names for them. I mean, they were printed
from the same list, so in the same lexical context, and they are
different... It's a bit confusing that they "look the same" when
printed -- they wouldn't look the same if their names were something
"generic" like "#<continuation>", but they actually have names that look
like something generated by gensym. I'm probably missing something, but
can't see exactly what.

Thanks!
J.




_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to