eimantas
(Eimantas)
1
From my current usage (anecdotal data) I can't seem to find a scenario where I would use catchToEffect() without map'ing the Result<Value,Error>. I wonder if it would make sense to have an overload of catchToEffect() that accepts the map closure?
mbrandonw
(Brandon Williams)
2
Hey @eimantas, this is a good suggestion! Looking through the code base of isowords shows that pretty much every .catchToEffect() is followed by a .map.
Would you like to PR adding an overload to Effect that takes a closure for mapping? If not we can take care of it.
eimantas
(Eimantas)
3
I would love to make a PR :)
eimantas
(Eimantas)
4
PR is waiting for review.
One note though - I added an overload to Publisher protocol rather than Effect (next to plain catchToEffect(). Is there a reason to make an overload in Effect rather than Publisher?
mbrandonw
(Brandon Williams)
5
Ah that was my mistake. I meant to say it should be defined on Publisher.
Thanks for the PR! Will review tomorrow :)