Programming Problem Solutions in Scala