Source: https://www.math.univ-paris13.fr/~chaussar/Teaching/2010-2011/IR2-POO/IR2-TP2.pdf