attempted (P55)
scala exercises (P55)