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