Source: http://users.polytech.unice.fr/~karima/teaching/courses/I6/cours/module_I6_Collections_4Slides.pdf