Functional programming exercises 2013-09-27