What is the easiest way to make clojure's get function evaluate the
value for 'not-found' only if the key is not found? Do I have to write
a macro like
(defmacro my-get [map key not-found]
`(if (contains? ~map ~key)
(get ~map ~key)
~not-found))
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---