exercises from Fuctional Programming in Scala