-
-
Save ceremcem/d1e0058b3a843f5ad16d432d9dd92de8 to your computer and use it in GitHub Desktop.
fizzbuzz with LiveScript
This file contains hidden or 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
global <<< require \prelude-ls | |
fizzbuzz = (x) -> | |
| x % 15 is 0 => \fizzbuzz | |
| x % 5 is 0 => \buzz | |
| x % 3 is 0 => \fizz | |
| otherwise => x | |
[1 to 100] |> map fizzbuzz |> each console.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment