Closed AndWass closed 3 years ago
Another option is to add a NonstopGeneratorExt
trait that contains the methods that aren't handling stopping generators gracefully.
I think maybe the second option is better?
Yah that's what I'm thinking as well. A third option is of course to continue having the methods in GeneratorExt
and just document the behaviour. Which is probably the best from an ergonomic point of view.
For now I will leave them in GeneratorExt
and do nothing more about it.
Some functions, for instance
reduce
does not work properly when used with spuriously stopping generators. Should we add a marker trait that signals that a generator is not spuriously stopping, and only implement reduce for those generators?