Skip to content

Instantly share code, notes, and snippets.

@ykhs
Created August 30, 2012 03:01
Show Gist options
  • Save ykhs/3521911 to your computer and use it in GitHub Desktop.
Save ykhs/3521911 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