Created
March 24, 2012 20:14
-
-
Save josevalim/2187439 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 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