Add an optional return value to the callback function generator.