http://www.jifuyi.com/erlang-tail-recursion/
http://erlang-china.org/study/the-right-tail-recursive.html