Re: Using deftype to define mutually recursive data inside agent

2010-03-04 Thread Stuart Sierra
deftype just defines a map-like structure with fixed fields; it isn't going to change the way you deal with that structure in an Agent. -SS On Mar 3, 5:02 am, zahardzhan zahardz...@gmail.com wrote: Sorry my english I use in my small clojure program one complicated mutually-recursive data

Re: Using deftype to define mutually recursive data inside agent

2010-03-04 Thread ataggart
You can use *agent* from inside an agent thread to obtain the current agent. On Mar 3, 2:02 am, zahardzhan zahardz...@gmail.com wrote: Sorry my english I use in my small clojure program one complicated mutually-recursive data structure that represents an agent-in-environment. This structure

Re: Using deftype to define mutually recursive data inside agent

2010-03-04 Thread Steven E. Harris
ataggart alex.tagg...@gmail.com writes: You can use *agent* from inside an agent thread to obtain the current agent. Is this documented? -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Using deftype to define mutually recursive data inside agent

2010-03-04 Thread Meikel Brandmeyer
Hi, On Mar 5, 2:57 am, Steven E. Harris s...@panix.com wrote: ataggart alex.tagg...@gmail.com writes: You can use *agent* from inside an agent thread to obtain the current agent. Is this documented? Yes. http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/*agent*

Using deftype to define mutually recursive data inside agent

2010-03-03 Thread zahardzhan
Sorry my english I use in my small clojure program one complicated mutually-recursive data structure that represents an agent-in-environment. This structure is clojure agent which have self-reference inside himself and reference to environment, where environment is set of agents: (let [a (agent