Take function objects instead of functions in register_function
Merge pull request #11 from lundiorg/expose-functors

Take function objects instead of functions in register_function.
Fixes #7.