Hello Michael, On Jan 3, 7:40 pm, MS <5lvqbw...@sneakemail.com> wrote: > Hi, I'm new to clojure (though I've messed around in scheme a little) > and I'm trying to represent an electrical circuit with "pins" and > "nets" (ie in graph terminology vertices and edges). > > I'd like to represent the nets as {:name "net_name" :pins #{pin1 pin2 > pin3}} etc. > I'd like to represent each pin as {:name "pin_name" :net the_net :type > pin_type} > > I want to query the net for all its attached pins, and to query any > pin to see what net it's attached to. The problem here is that these > are mutually-referring things. The net refers to the pins and each > pin refers back to the net. >
I found it difficult to find, but I remembered a thread on something similar: http://groups.google.com/group/clojure/browse_thread/thread/604b48a520aa0253/5e3f5d3d1d870557?lnk=gst&q=cross+referencing+objects#5e3f5d3d1d870557 The answer from David Nolen mentioned some little used functions of the Clojure language that may be useful for you. Saul -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en