Skip to content

tap

tap<E, A>(f): (data) => Result<E, A>

Defined in: Core/Result.ts:178

Executes a side effect on the success value without changing the Result. Useful for logging or debugging.

E

A

(a) => void

(data): Result<E, A>

Result<E, A>

Result<E, A>

pipe(
  Result.of(5),
  Result.tap(n => console.log("Value:", n)),
  Result.map(n => n * 2)
);