Created
July 20, 2014 10:52
-
-
Save kkismd/3be26ccf906984e3e94c to your computer and use it in GitHub Desktop.
4行でFizzBuzz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fizzbuzz = ->(i){ i % 3 == 0 && i % 5 == 0 ? 'FizzBuzz' : i } | |
fizz = ->(i){ i % 3 == 0 ? 'Fizz' : i } | |
buzz = ->(i){ i % 5 == 0 ? 'Buzz' : i } | |
(1..16).map(&fizzbuzz).map(&fizz).map(&buzz) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment