Skip to content

Instantly share code, notes, and snippets.

@vortec
Created February 5, 2017 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vortec/b8d6fa8c23aaa3b98108b26cd12af0da to your computer and use it in GitHub Desktop.
Save vortec/b8d6fa8c23aaa3b98108b26cd12af0da to your computer and use it in GitHub Desktop.
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