Try removing the colon from your ":meta" call in the action, so you
don't invoke
a map fetch, but call the #'meta function.
user> (defn action2 [_] (meta *agent*)) ; call meta, not :meta
user> (await (send agt action2))
user> @agt
{"some" "data"}
On Dec 17, 10:35 am, Carlos Moscoso <[email protected]> wrote:
> 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> @agt
> {"some" "data"}
>
> The same happens with a validation function. I'm wondering if this is
> the expected behavior.
>
> Thanks.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
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