On Tue, Jul 31, 2012 at 1:08 AM, Aaron Cohen <[email protected]> wrote:
> On Mon, Jul 30, 2012 at 6:55 PM, Moritz Ulrich <[email protected]> 
> wrote:
>> (some identity ((juxt :k1 :k2) m)) is the first thing I can think of.
>
> For even more fun, try (some m [:k1 :k2]) :)

The flip side of this proposal is:

((some-fn :k1 :k2) m)

Which takes advantage of the fact that keywords can be called as
functions. That means it will only work for keyword keys, but the
upshot is that it will work for arbitrary functions (not just
keywords) and m need not be a map.

See also every-pred, which

-- 
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

Reply via email to