Created
April 5, 2016 00:30
-
-
Save joffotron/3428103b7efef9c844e6f1b6dcc7dcfe to your computer and use it in GitHub Desktop.
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
fizzbuzz = fn | |
0, 0, _ -> "FizzBuzz" | |
0, _, _ -> "Fizz" | |
_, 0, _ -> "Buzz" | |
_, _, c -> c | |
end | |
buzzy = fn n -> fizzbuzz.(rem(n,3), rem(n,5), n) end | |
Enum.each 10..16, fn i -> IO.puts buzzy.(i) end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment