> (methods multifn)
>
> Returns a hash-map where the keys are vectors if the dispatch values of the
> multimethods were vectors, weird and cool :)
> How does one check for the existence of a key in a hash-map if the key is
> vector? I tried several things and nothing obvious seemed to work.
Vectors are values that compare like scalars do:
({[1 2 3] :numbers [\a \b \c] :letters} [1 2 3]) => :numbers
({[1 2 3] :numbers [\a \b \c] :letters} [3 4 5]) => nil
Which is both surprising (to a newbie like me) and extremely logical
in retrospect. :)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---