when is it best to use a recursive function vs a for loop

jackpot@lemmy.mlbanned from sitebanned from site to Programming@programming.dev – 30 points –
50

You are viewing a single comment

In Elixir & Erlang, they don’t even have a for-loop construct. You have to use recursion. And I think that’s beautiful. I also think tail-call optimization is beautiful.