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