pure<A, B> function

TaskOption<B> Function(TaskOption<A> taskOption) pure<A, B>(
  1. B b
)

Replaces the TaskOption with one that resolves to a Some wrapping the given value.

expect(
  await some(123).chain(pure('hello'))(),
  O.some('hello'),
);

Implementation

TaskOption<B> Function(TaskOption<A> taskOption) pure<A, B>(B b) =>
    (taskOption) => some(b);