3 ms·
> > Is it easier to write with a loop? Then use a loop! > Yes, but, say, in Haskell, that's not an option. Sure it is! It might not be a "for" loop or a "whi
by tome 9y ago
> > Is it easier to write with a loop? Then use a loop!
> Yes, but, say, in Haskell, that's not an option.
Sure it is! It might not be a "for" loop or a "while" loop with a "for" or "while" keyword, but a tail recursive function is a loop, and pretty much every loop in an imperative language can easily be translated into a recursive function in a functional language.