Saturday, September 13, 2014

Refactoring my generalized fizzbuzz to use only applicative higher-order functions

I refactored my my previous version of generalized FizzBuzz, so that, it doesn't use neither for loops nor recursion. Now it only uses: reduce and map.

This is the new code:


The tests are exactly the same as in the previous version:

No comments:

Post a Comment