Created
July 1, 2011 20:37
-
-
Save raek/1059347 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(fn [coll n] | |
(loop [coll coll | |
vs (replicate n [])] | |
(if (empty? coll) | |
(map seq vs) | |
(recur (drop n coll) | |
(doall (map conj vs (take n coll))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment