Or:

(if-let [[_ v] (find my-map key)]
   v
   :something-else)

On Tue, Oct 25, 2011 at 1:19 AM, Sean Corfield <seancorfi...@gmail.com>wrote:

> On Fri, Oct 21, 2011 at 10:05 AM, Michael Forster <m...@sharedlogic.ca>
> wrote:
> > Yes:  Was that a nil value for the key :foo in my map or did :foo not
> > exist?
>
> If you need to distinguish between ":foo is missing" and ":foo's value
> indicates non-existence", what about:
>
> (get my-map :foo ::missing)
> --
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
> World Singles, LLC. -- http://worldsingles.com/
> Railo Technologies, Inc. -- http://www.getrailo.com/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to