Mercurial > coderloop
diff src/shazoooooooo.clj @ 0:307a81e46071 tip
initial committ
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 18 Oct 2011 01:17:49 -0700 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/shazoooooooo.clj Tue Oct 18 01:17:49 2011 -0700 1.3 @@ -0,0 +1,20 @@ 1.4 +(ns coderloop.shazoooooooo) 1.5 +(use 'coderloop.utils) 1.6 + 1.7 + 1.8 + 1.9 + 1.10 + 1.11 +(defn shazzooom [n] 1.12 + (dorun 1.13 + (map #(cond (and (= 0 (rem % 3)) (= 0 (rem % 7))) 1.14 + (print"Shazoo!\n") 1.15 + (= 0 (rem % 3)) 1.16 + (print "Moo\n") 1.17 + (= 0 (rem % 7)) 1.18 + (print "Muu\n")) 1.19 + (range 1 (inc n))))) 1.20 + 1.21 + 1.22 +(if *command-line-args* 1.23 + (shazzooom (read-integer (first *command-line-args*))))