code for higher order functions
Merge pull request #5 from typesafehub/wip/functions

code for higher order functions