Hi,
Am 31.03.2011 um 00:02 schrieb Avram:
> user=> (defn metric-diff [metric & json-objs]
> (apply - (map (comp (Integer/parseInt :value) (keyword metric))
> json-objs)))
(defn metric-diff
[metric & json-objs]
(apply - (map (comp #(Integer/parseInt %) :value (keyword metric))
json-objs))))
or
(defn metric-diff
[metric & json-objs]
(let [kmetric (keyword metric)]
(apply - (map #(-> % kmetric :value Integer/parseInt) json-objs))))
Sincerely
Meikel
--
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