completed exercises from odersky's functional programming coursera class in swift