|
From: | Jason Felice |
Subject: | Re: [Chicken-users] Printing recursive objects |
Date: | Wed, 24 Sep 2014 17:18:47 -0400 |
scheme@(guile-user)> (define v (vector 0))
scheme@(guile-user)> (vector-set! v 0 v)
scheme@(guile-user)> v
$2 = #(#0#)
It can even read the self-referencing syntax, IIRC.
I know there's discussion of using Tortoise and Hare to break cycles in this situation, but what guile does seems more sophisticated.
Hello Chickens,
If I have an object that references itself, like for example...
(define v (vector 0))
(vector-set! v 0 v)
and I print it, chicken goes -understandably- into an infinite loop.
Is there a way to prevent this, or is there something like
define-record-printer for non-record objects.
thank you,
Richard
_______________________________________________
Chicken-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/chicken-users
[Prev in Thread] | Current Thread | [Next in Thread] |