scala for impatient exercises