Created
September 5, 2012 16:45
Revisions
-
simonjefford revised this gist
Sep 5, 2012 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1 @@ (fn [coll n] (mapcat #(repeat n %) coll)) -
simonjefford revised this gist
Sep 5, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ (fn [coll n] (loop [output [] input coll] (if (seq input) (recur (concat output (repeat n (first input))) (next input)) output))) -
simonjefford created this gist
Sep 5, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ (fn [coll n] (loop [output [] input coll] (if (seq input) (recur (concat output (repeat n (first input))) (next input)) output)))