Skip to content

Instantly share code, notes, and snippets.

@chrismo
Created February 24, 2015 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrismo/17d3fe00b5117d394aa2 to your computer and use it in GitHub Desktop.
Save chrismo/17d3fe00b5117d394aa2 to your computer and use it in GitHub Desktop.
4clojure 54
(fn [x coll]
(keep #(if (= (count %) x) % nil)
(map #(map last %)
(vals
(group-by
#(quot (first %) x)
(map-indexed #(vector % %2) coll)))))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment