尾递归优化
超赞的文章: Tail Call Optimization in Elixir & Erlang – not as efficient and important as you probably think (链接备份)
don’t assume – always proof.
So, the choice is now mostly a matter of taste. If you really do need the utmost speed, you must measure. You can no longer be sure that the tail-recursive list function always is the fastest.
关于这篇文章的讨论: https://elixirforum.com/t/tail-call-optimization-in-elixir-erlang-not-as-efficient-and-important-as-you-probably-think/880 (链接备份)