dry-rb / dry-effects

Algebraic effects in Ruby
https://dry-rb.org/gems/dry-effects/
MIT License
112 stars 20 forks source link

Add an example of correct usage of lazy enumerators #78

Closed flash-gordon closed 4 years ago

flash-gordon commented 4 years ago

I came across some incompatibility between dry-effects and built-in lazy enumerators. It's possible to make it work but it requires some coordination. Maybe I should add an API where stack is not copied but shared instead. It's a bit dirty but will work better/more efficient in this case.