Support `this` argument for `{Either,Option}.gen()`?
ryota-ka opened this issue · comments
Ryota Kameoka commented
What is the problem this feature would solve?
Unlike Effect.gen()
, {Either,Option}.gen()
does not accept the this
argument so that the this
context is passed into the generator function.
This can be problematic when the function is used within a class with a method returning an Either
/Option
.
What is the feature you are proposing to solve the problem?
Add an ability to take the this
argument to these functions.
What alternatives have you considered?
Aliasing this
every time, like const self = this;
.