updated documentation on closures, hope this is easier to understand
added function types section