Created
November 30, 2018 09:18
-
-
Save edisonywh/c9e223be2f127c2f8e19fa920192f9b7 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 Recursion do | |
def traverse([]), do: IO.puts "Done" | |
def traverse([head | tail]) do | |
IO.puts "Element: #{head}" | |
traverse(tail) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment