added function composition

this could be doable better with unboxed closures. I mostly wanted to try what was possible with what we have right now in terms of function composition.
Feedback welcome.