> It wasn't invented as a set of restrictions, it was just just discovered and formalized.
You share good company with this observation. Philip Wadler (who put the monads into Haskell) often talks about functional languages having been discovered, rather than invented.
Haskell is System F (The polymorphic lambda calculus) with the Hindley-Milner type system. (Both Hindley and Milner independently discovered it.)
Curry and Howard observed that this type system corresponds to 1st order logic - types are propositions and programs are proofs, e.g.
modus ponens:
P implies Q
P is true
Therefore Q must also be true.
H-M 'App' rule:
f has type P -> Q
x has type P
Therefore f(x) has type Q.
You don't have to dig far into Haskell to find the 'discovered' stuff.
You share good company with this observation. Philip Wadler (who put the monads into Haskell) often talks about functional languages having been discovered, rather than invented.
Haskell is System F (The polymorphic lambda calculus) with the Hindley-Milner type system. (Both Hindley and Milner independently discovered it.)
Curry and Howard observed that this type system corresponds to 1st order logic - types are propositions and programs are proofs, e.g.
You don't have to dig far into Haskell to find the 'discovered' stuff.