-> related error in clojure 1.2

2010-11-09 Thread Carlos Moscoso
user=> (-> {:a 1} (keyword "a")) java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to java.lang.String (NO_SOURCE_FILE:0) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegr

Re: Is this the expected behavior related to agent options in action function?

2009-12-17 Thread Carlos Moscoso
Just a follow up, Chris House pointed me out on twitter that the correct would be to use (meta *agent*) instead of (:meta *agent*). On Dec 17, 1:35 pm, Carlos Moscoso wrote: > Hi, > > I'm trying to access from within a action function, and with no > success, the metadata asso

Is this the expected behavior related to agent options in action function?

2009-12-17 Thread Carlos Moscoso
Hi, I'm trying to access from within a action function, and with no success, the metadata associated with agent. My code: user> (def agt (agent nil :meta {"some" "data"})) user> (defn action [_] (:meta *agent*)) user> (await (send agt action)) Wich results in: user> @agt nil Instead of: user> @