Created
January 12, 2012 18:32
-
-
Save alanpeabody/1602251 to your computer and use it in GitHub Desktop.
foosball.clj
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
(defn modfive [number] | |
(= 0 (mod number 5))) | |
(defn modthree [number] | |
(= 0 (mod number 3))) | |
(defn foosball [number] | |
(if (modthree number) | |
(if (modfive number) "foosball" "foos") | |
(if (modfive number) "ball" number))) | |
(map foosball (range 1 101)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would be more impressed if I saw tests. :-P