Mark Volkmann a écrit :
> Why does this output 1?
>
> (def my-ref (ref {:a 1}))
> (my-ref :a)
>
> I thought I could only access data in a ref by dereferencing it, but
> this shows otherwise.
>
>
Refs (like Vars) implement IFn by delegating to their value but Rich
stated to not rely on this behaviour.
Christophe
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---