Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
7
Task/FizzBuzz/Frege/fizzbuzz.frege
Normal file
7
Task/FizzBuzz/Frege/fizzbuzz.frege
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
gen n word = cycle (take (n - 1) (repeat "") ++ [word])
|
||||
pattern = zipWith (++) (gen 3 "fizz") (gen 5 "buzz")
|
||||
fizzbuzz = zipWith combine pattern [1..] where
|
||||
combine word number = if null word
|
||||
then show number
|
||||
else word
|
||||
show $ take 100 fizzbuzz
|
||||
Loading…
Add table
Add a link
Reference in a new issue