Source: http://www.lsv.fr/~schwoon/enseignement/projet-prog2/2020/Introduction_Scala.pdf