If you find this interesting, you should give the paper "Basic Polymorphic Typechecking" by Luca Cardelli a read[0]. It's probably the clearest explanation I've read of how parametric polymorphism and type inference works (spoiler: typechecking is actually the same thing as type inference in this model).<p><a href="http://lucacardelli.name/Papers/BasicTypechecking.pdf" rel="nofollow">http://lucacardelli.name/Papers/BasicTypechecking.pdf</a>