Playing about with FP in Scala