Skip to content

tap

tap<A>(f): (data) => Maybe<A>

Defined in: Core/Maybe.ts:200

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

A

(a) => void

(data): Maybe<A>

Maybe<A>

Maybe<A>

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