Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

FizzBuzz everyday

Name: Anonymous 2011-09-14 3:47

(use '[match.core :only (match)])

(doseq [n (range 1 101)]
  (println (match [(mod n 3) (mod n 5)]
                  [0 0] "FizzBuzz"
                  [0 _] "Fizz"
                  [_ 0] "Buzz"
                  :else n)))

Name: Anonymous 2011-09-14 5:08

>>6
0x0d, 0x0a is equivalent to \r\n, the newline in Windows.
The code is for Linux. Newline in linux is just \n, or 0x0a.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List