Skip to content

Instantly share code, notes, and snippets.

@KamilLelonek
Created April 2, 2018 21:29
Show Gist options
  • Save KamilLelonek/a5192bddd1c9fd4edde2f96718971736 to your computer and use it in GitHub Desktop.
Save KamilLelonek/a5192bddd1c9fd4edde2f96718971736 to your computer and use it in GitHub Desktop.
def call(input, acc \\ "")
def call(0, acc), do: acc
def call(input, acc)
when is_binary(input) do
input
|> :binary.decode_unsigned()
|> call(acc)
|> prepend_zeros(input)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment