Why does mutually recursive data/fns require `rec` keyword?

Because oh boy, was I bitten by it in Haskell.

Also, OCaml allows one to use the idiom of keeping the same name for an evolving value as its type transforms. This lowers cognitive load and avoids bugs of using the wrong (earlier) version of the value. E.g. let x = f a in let x = g x in let x = ....

5 Likes