Exercices of the FP in scala