Skip to content

Instantly share code, notes, and snippets.

@sammylupt
Created February 10, 2016 17:30
Show Gist options
  • Save sammylupt/8f8af7e79a6e488289ee to your computer and use it in GitHub Desktop.
Save sammylupt/8f8af7e79a6e488289ee to your computer and use it in GitHub Desktop.
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