Last active
December 20, 2017 03:17
-
-
Save alandipert/1156115 to your computer and use it in GitHub Desktop.
Revisions
-
alandipert revised this gist
Feb 7, 2014 . 1 changed file with 2 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 @@ -1,7 +1,7 @@ ;; FizzBuzz, the fib of pattern matching ;; with https://github.com/clojure/core.match (require '[clojure.core.match :refer [match]]) (doseq [n (range 1 101)] (println (match [(mod n 3) (mod n 5)] -
Alan Dipert revised this gist
Aug 19, 2011 . 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 @@ -5,7 +5,7 @@ (doseq [n (range 1 101)] (println (match [(mod n 3) (mod n 5)] [0 0] "FizzBuzz" [0 _] "Fizz" [_ 0] "Buzz" :else n))) -
Alan Dipert created this gist
Aug 19, 2011 .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,11 @@ ;; FizzBuzz, the fib of pattern matching ;; with https://github.com/swannodette/match (use '[match.core :only (match)]) (doseq [n (range 1 101)] (println (match [(mod n 3) (mod n 5)] [0 0] "FizzBizz" [0 _] "Fizz" [_ 0] "Buzz" :else n)))