4 ms·
I agree, I don't think I have ever used recursion in production code. You can normally avoid it by using a queue or stack data structure. Or rethinking the prob
by bbcbasic 11y ago
I agree, I don't think I have ever used recursion in production code. You can normally avoid it by using a queue or stack data structure. Or rethinking the problem.
Haskell tutorials usually advise against explicit recursion, instead favouring combinations of map, filter etc. as the best choice, and failing that use foldl', foldr etc. With explicit recursion only being used if you really have a good reason.