Created
August 23, 2012 16:50
-
-
Save jonatasemidio/3438630 to your computer and use it in GitHub Desktop.
Implementação do FizzBuzz Semântico!!
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
//Implementação do FizzBuzz semântico: Veja também a implementação rápida - https://gist.github.com/3438973 | |
seMultiploDeCinco = {it%5==0}; seMultiploDeTres = {it%3==0} | |
fizzbuzz = {seMultiploDeTres (it) & seMultiploDeCinco (it) ? 'fizzbuzz': | |
seMultiploDeTres (it) ? 'fizz': | |
seMultiploDeCinco (it) ? 'buzz': | |
'Without fizzbuzz!'} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment