On Nov 15, 1:31 am, samppi <[EMAIL PROTECTED]> wrote:
> Yeah, I surmised as much. The thing is, I'm writing a YAML library in
> Clojure, and YAML allows circular recursion like that:
>
>   ---
>   &x
>   - 3
>   - 2
>   - 1
>   - *x
>
> ...So I'm wondering what I should do if a document like that were
> loaded. Ah well, I'll worry about that later.
>

You can define the collection so that it contains its own Var:

(def x [1 2 3 #'x])

(identical? (var-get (x 3)) x) ; will return true




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to