Created
February 5, 2017 18:13
-
-
Save vortec/b8d6fa8c23aaa3b98108b26cd12af0da 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 Math do | |
def zero_a?(0) do | |
true | |
end | |
def zero_a?(_) do | |
false | |
end | |
def zero_b?(x) do | |
if x == 0 do | |
true | |
else | |
false | |
end | |
end | |
def zero_c?(x) do | |
case x do | |
0 -> | |
true | |
_ -> | |
false | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment