FP Examples in Scala