Add support for scheduling anonymous functions