annotate 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
rev   line source
rlm@0 1 (ns coderloop.shazoooooooo)
rlm@0 2 (use 'coderloop.utils)
rlm@0 3
rlm@0 4
rlm@0 5
rlm@0 6
rlm@0 7
rlm@0 8 (defn shazzooom [n]
rlm@0 9 (dorun
rlm@0 10 (map #(cond (and (= 0 (rem % 3)) (= 0 (rem % 7)))
rlm@0 11 (print"Shazoo!\n")
rlm@0 12 (= 0 (rem % 3))
rlm@0 13 (print "Moo\n")
rlm@0 14 (= 0 (rem % 7))
rlm@0 15 (print "Muu\n"))
rlm@0 16 (range 1 (inc n)))))
rlm@0 17
rlm@0 18
rlm@0 19 (if *command-line-args*
rlm@0 20 (shazzooom (read-integer (first *command-line-args*))))