Support functions as arguments to a future.
Related to issue #2.