Scala List Example from Coursera's Prog Fun class