As a start, you could use group-by with a function that squashes together
items that fall in the same second and then count the size of each value.
(reduce-kv (fn [c k v] (assoc c k (count v))) {} (group-by #(quot % 1000)
epochs))
;=> {1405060205 1, 1405060200 1, 1405060201 8, 1405060202 1}
--
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
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.