YAPC::EU 2018 Glasgow Update!

This commit is contained in:
Ingy döt Net 2018-08-17 15:15:24 +01:00
parent 22f33d4004
commit 4e2d22a71d
1170 changed files with 15042 additions and 3047 deletions

View file

@ -1,6 +1,18 @@
main = putStr $ concat $ map fizzbuzz [1..100]
fizzbuzz :: Int -> String
fizzbuzz n =
"\n" ++ if null (fizz++buzz) then show n else fizz++buzz
where fizz = if mod n 3 == 0 then "Fizz" else ""
buzz = if mod n 5 == 0 then "Buzz" else ""
'\n' :
if null (fizz ++ buzz)
then show n
else fizz ++ buzz
where
fizz =
if mod n 3 == 0
then "Fizz"
else ""
buzz =
if mod n 5 == 0
then "Buzz"
else ""
main :: IO ()
main = putStr $ concatMap fizzbuzz [1 .. 100]