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

highgramming

Name: Anonymous 2013-02-18 1:09

can you code while high?

fizzbuzz n = map aux [1..n]
aux [] = []
aux (a:as) =
| a `mod` 3 == 0 && a `mod` 5 == 0 = "FizzBuzz" : aux as
| a `mod` 3 == 0 = "Fizz" : aux as
| a `mod` 5 == 0 = "Buzz" : aux as
| otherwise = show a : aux as

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