Created
December 11, 2010 00:01
-
-
Save ossareh/737007 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
(defn pos-int-range [max] | |
;; rest drops leading 0 | |
;; inc as range is not inclusive | |
(lazy-seq (rest (range (inc max))))) | |
(defn not-nil? [x] (not= nil x)) | |
(defn hiphop [n] | |
(cond (> n 2) | |
(cond (and (zero? (mod n 15))) "Hop" | |
(zero? (mod n 3)) "Hoppity" | |
(zero? (mod n 5)) "Hophop"))) | |
(map println (filter not-nil? (map hiphop (pos-int-range 15)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment