Skip to content

tap

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

Defined in: Core/Option.ts:200

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

A

(a) => void

(data): Option<A>

Option<A>

Option<A>

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