Add closure option to the tasks examples.