A coroutine can be defined as a special function that can give up control to its caller without losing its state.
The methods or functions that we are used to, the ones that conclusively return a value and don't remember state between invocations, can be thought of as a specialization of a coroutine, also known as subroutines.