Definition of coroutines