6 ms·
Haskell's type inference is optional: if you felt the above code is difficult to understand, you could manually specify the type of each statement. In a langua
by igorbark 9y ago
Haskell's type inference is optional: if you felt the above code is difficult to understand, you could manually specify the type of each statement.
In a language with a less powerful type system, you could write the same information in comments, but then the compiler wouldn't warn you if you accidentally changed the side effects of a statement.