Created
October 9, 2020 18:57
-
-
Save adolfont/a8f9f303b446d383a49b25bed04efa48 to your computer and use it in GitHub Desktop.
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
defmodule Fizzbuzz do | |
def exec(x) when rem(x, 15) == 0, do: :fizzbuzz | |
def exec(x) when rem(x, 3) == 0, do: :fizz | |
def exec(x) when rem(x, 5) == 0, do: :buzz | |
def exec(x), do: x | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment