Playing with reduceLeft, reduceRight, foldLeft, foldRight API in Scala