4 ms·
Wait, for loops and nested conditions is an OO concept? What does Elixir do instead?
by winrid 7y ago
Wait, for loops and nested conditions is an OO concept? What does Elixir do instead?
- winrid 7y agoIt seems since Elixir is purely functional you don't mutate things. So basically you use tail call optimised recursion for everything. Neat.
- anthony_doan 7y agoRecursion lol. Erlang does it too. If you want to have state you do recursion and call itself with the updated value. fn me(iter) -> me(iter+1) end
- didibus 7y agoIt's not OO per say, but it is an imperative concept, OO is almost always imperative.