Skip to content

Instantly share code, notes, and snippets.

@josevalim
Created March 24, 2012 20:14
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 josevalim/2187439 to your computer and use it in GitHub Desktop.
Save josevalim/2187439 to your computer and use it in GitHub Desktop.
defmodule Iter do
def b(<<x, y | binary>>) do
<<x + 1, b(y) | binary>>
end
def b(<<>>) do
<<>>
end
end
IO.puts Iter.b("hello")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment