You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I come from Java (vavr) and for the side effect function I mean something like peek(), that is, just peek without changing Right if it's a Right, and for Left it is called peekLeft().
Now I need to do something like this to simulate peek:
chainFirst() requires a function argument having a return type of TaskEither<L, C>, while the peek()'s Consumer argument doesn't return anything.
That is, it just "observe" the value.
You can return a TaskEither with return type as void. When chainFirst is executed the result is ignored, so in practice it works as if you are observing the value
Hi, I come from Java (vavr) and for the side effect function I mean something like peek(), that is, just peek without changing
Right
if it's aRight
, and forLeft
it is calledpeekLeft()
.Now I need to do something like this to simulate peek:
The text was updated successfully, but these errors were encountered: