А! Понял.
Надо вот так:
-module(test).
-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.