Last active
October 16, 2024 12:00
-
-
Save zelark/a766274986d6212a8f85d7aa4c6d1179 to your computer and use it in GitHub Desktop.
Revisions
-
zelark revised this gist
Oct 7, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 @@ -3,6 +3,6 @@ buzzes (cycle ["" "" "" "" "Buzz"]) pattern (map str fizzes buzzes) numbers (map str (rest (range)))] (take n (map #(some not-empty %&) pattern numbers)))) ;; another option would be `(partial max-key count)` (run! println (fizzbuzz 100)) -
zelark revised this gist
Sep 15, 2020 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 @@ -5,5 +5,4 @@ numbers (map str (rest (range)))] (take n (map #(some not-empty %&) pattern numbers)))) (run! println (fizzbuzz 100)) -
zelark revised this gist
Sep 13, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 @@ -3,7 +3,7 @@ buzzes (cycle ["" "" "" "" "Buzz"]) pattern (map str fizzes buzzes) numbers (map str (rest (range)))] (take n (map #(some not-empty %&) pattern numbers)))) (doseq [x (fizzbuzz 100)] (println x)) -
zelark revised this gist
Sep 13, 2020 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or 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,11 +1,9 @@ (defn fizzbuzz [n] (let [fizzes (cycle ["" "" "Fizz"]) buzzes (cycle ["" "" "" "" "Buzz"]) pattern (map str fizzes buzzes) numbers (map str (rest (range)))] (take n (map #(first (remove #{""} %&)) pattern numbers)))) (doseq [x (fizzbuzz 100)] (println x)) -
zelark revised this gist
Sep 12, 2020 . 1 changed file with 9 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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,7 +1,11 @@ (require '[clojure.string :refer [blank?]]) (defn fizzbuzz [n] (let [fizzes (cycle ["" "" "Fizz"]) buzzes (cycle ["" "" "" "" "Buzz"]) pattern (map str fizzes buzzes) numbers (map str (rest (range)))] (take n (map #(first (remove blank? %&)) pattern numbers)))) (doseq [x (fizzbuzz 100)] (println x)) -
zelark revised this gist
Sep 12, 2020 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 @@ -5,5 +5,3 @@ pattern (map str fizzes buzzes) numbers (map str (rest (range)))] (take 100 (map #(first (remove blank? %&)) pattern numbers))) -
zelark created this gist
Sep 12, 2020 .There are no files selected for viewing
This file contains hidden or 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,9 @@ (require '[clojure.string :refer [blank?]]) (let [fizzes (cycle ["" "" "Fizz"]) buzzes (cycle ["" "" "" "" "Buzz"]) pattern (map str fizzes buzzes) numbers (map str (rest (range)))] (take 100 (map #(first (remove blank? %&)) pattern numbers)))