Created
February 10, 2016 17:30
-
-
Save sammylupt/8f8af7e79a6e488289ee 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
defmodule HappyNumberFinder do | |
# def get_sum(number) | |
def find(number) do | |
_find(number, []) | |
end | |
defp _find(number, guesses) where number in guesses do | |
{:unhappy} | |
end | |
defp _find(number, guesses) do | |
# … | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment