tap()
tap<
E1,A,E2>(self,f):Either<E1|E2,A>
Executes a side effect on the Right value and returns the original Either.
Type Parametersβ
E1: E1β
The original error type.
A: Aβ
The success type.
E2: E2β
The side effect error type.
Parametersβ
self: Either<E1, A>β
The Either to tap.
f: (a) => Either<E2, unknown>β
The side effect function.
Returns: Either<E1 | E2, A>β
The original Either.
Sinceβ
2.0.0