Skip to content

Instantly share code, notes, and snippets.

@ceremcem
Forked from ykhs/fizzbuzz.ls
Created September 5, 2017 00:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ceremcem/d1e0058b3a843f5ad16d432d9dd92de8 to your computer and use it in GitHub Desktop.
Save ceremcem/d1e0058b3a843f5ad16d432d9dd92de8 to your computer and use it in GitHub Desktop.
fizzbuzz with LiveScript
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