random Scala functions while learning functional programming