by ReleaseCandidat · 3y ago · 0 comments
You should not use them most of the time in functional languages (like OCaml and Haskell and...) for this reasons either, it's just that (almost) all examples for beginners use them because they are "easier" than for example trees.
Oh, by the way, OCaml does not have significant whitespace (but e.g.F# and Haskell do).
You also use recursion all the time, and no, recursion is not generally straightforwardly optimised into iteration unless you're doing trivial tail recursion.
I thought I was being slick