support custom function for actions

Since we have the benefit of functors for action objects, it would be great to allow custom function support, particularly for debugging, logging and profiling.