How to infer the type of an expression manually
Types are infered using a process generally called unification. Haskell belongs to the Hindley-Milner family, which is the unification algorithm it uses to determine the type of an expression. If unification fails, then the expression is a type error. The expression head . filter fst passes. Let’s do the unification manually to see what why … Read more