PM
To: Clojure
Subject: Re: Data filtering function
(map #(get % ["45"]) d)
On Jul 5, 12:49 pm, "Bhinderwala, Shoeb"
wrote:
> I need help to write a small filtering function. Given the following
> definitions:
>
> (def m1
> {["45"] {:a 45 :b "d
(map #(get % ["45"]) d)
On Jul 5, 12:49 pm, "Bhinderwala, Shoeb"
wrote:
> I need help to write a small filtering function. Given the following
> definitions:
>
> (def m1
> {["45"] {:a 45 :b "day1"}
> ["55"] {:a 55 :b "day1"}
> ["25"] {:a 25 :b "day1"}
> ["15"] {:a 1
This should work:
(defn my-filter [coll k]
(for [m coll]
(get m k)))
--
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 patien
Try merge-with to create a single map.
On Jul 5, 1:49 pm, "Bhinderwala, Shoeb"
wrote:
> I need help to write a small filtering function. Given the following
> definitions:
>
> (def m1
> {["45"] {:a 45 :b "day1"}
> ["55"] {:a 55 :b "day1"}
> ["25"] {:a 25 :b "day1"}
>