The word wrap kata in Scala