My assignment of "Functional Programming Principles in Scala"(https://class.coursera.org/progfun-005)