Skip to content

Instantly share code, notes, and snippets.

@savonarola
Created March 3, 2009 12:43
Show Gist options
  • Save savonarola/73300 to your computer and use it in GitHub Desktop.
Save savonarola/73300 to your computer and use it in GitHub Desktop.
-module(test_gist).
-export([test_func/0]).
-export([test_recursion/2]).
test_func() ->
test_recursion(1, 6).
test_recursion(X, N) ->
if
N > 0 ->
io:format("cycle! ~w ~n", [N]),
test_recursion(X,N-1);
N == 0 ->
io:format("END cycle! ~w ~n", [N])
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment