Answer to excercises to FP in scala book