some training exercices in Scala