3 ms·
A more Python-similar Haskell FizzBuzz is at http://www.haskell.org/haskellwiki/Fizzbuzz http://www.haskell.org/haskellwiki/Fizzbuzz I think that's the cleanes
by tel 14y ago
A more Python-similar Haskell FizzBuzz is at http://www.haskell.org/haskellwiki/Fizzbuzz http://www.haskell.org/haskellwiki/Fizzbuzz
I think that's the cleanest method.
- mercuryrising 14y agoThe thing I really like about the Haskell Fibonacci and that Python FizzBuzz is the ease of scale. Want the next value of fib? Grab it. Want to put more restrictions on fizzbuzz? Add them to this list. You build the sequence with only the necessary amount of starting information (0:1 for fib, ( (3, "fizz"), (7, "buzz") ), and generate the rest as you need. These are the (I think) most beautiful solutions to problems.
- tel 14y agoThat's more extensible. I think that's the perennial problem with FizzBuzz, whether decides the spec demands generalizability or simplicity.