tap<A> function

TaskOption<A> Function(TaskOption<A> taskOption) tap<A>(
  1. FutureOr<void> f(
    1. A value
    )
)

Perform a side effect if the TaskOption is a Some.

Implementation

TaskOption<A> Function(TaskOption<A> taskOption) tap<A>(
  FutureOr<void> Function(A value) f,
) =>
    (fa) => TaskOption(fa.p(T.tap(O.fold(() {}, f))));