fromOption<A> static method

IOOption<A> fromOption<A>(
  1. Option<A> oa
)

Create an IOOption from the given Option, succeeding when it is a Some, and failing with None when it is a None.

Implementation

static IOOption<A> fromOption<A>(Option<A> oa) => ZIO.fromEither(oa.match(
      () => Either.left(const None()),
      Either.right,
    ));