Skip to content

Instantly share code, notes, and snippets.

@ceremcem
Forked from ykhs/fizzbuzz.ls
Created September 5, 2017 00:13

Revisions

  1. ykhs revised this gist Aug 31, 2012. No changes.
  2. ykhs revised this gist Aug 31, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion fizzbuzz.ls
    Original file line number Diff line number Diff line change
    @@ -6,4 +6,4 @@ fizzbuzz = (x) ->
    | x % 3 is 0 => \fizz
    | otherwise => x

    [1 to 100] |> map fizzbuzz |> each console.log
    [1 to 100] |> map fizzbuzz |> each console.log
  3. ykhs created this gist Aug 30, 2012.
    9 changes: 9 additions & 0 deletions fizzbuzz.ls
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    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