tap<A> function
Perform a side effect on the value of a Task.
expect(
await fromThunk(() => 'hi').chain(tap(print))(),
equals('hi'),
);
Implementation
Task<A> Function(Task<A> task) tap<A>(FutureOr<void> Function(A value) f) =>
flatMapFirst((a) => value(f(a)));