Very simple function: (defn map-filter [f coll] (map f (filter f (coll)))
Is there an API function for this that I am missing? For example, it is useful for pulling out all values in a list of maps of a certain key that is optional: Clojure=> (map-filter :k [{:a :b :c :d :k :found} {:a :b :c :d} {:a :b :c :d :k :other}]) (:found :other) -- 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 To unsubscribe from this group, send email to clojure+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.