Open ctongfei opened 7 years ago
Since Iterator
is not specialized and creates boxed objects for primitive types (e.g. Iterator[Int]
), it would be safer to be explicit, and add a conversion method to the coroutines-extras
project.
That'll be fine too :-) Thanks
Since the functionality of this is very similar to the C#/python
yield
, I wonder ifCoroutine._0[Y, R]
could extendIterable[Y]
andCoroutine.Instance[Y, R]
could extendIterator[Y]
. It makes looping on coroutines easier.