@Test public void foldMapLeft() { Async<Par_> async = ParInstances.async(); Kind<Par_, Integer> future = parseInt("kjsdf").foldMap(nothing(), async); assertThrows(NumberFormatException.class, future.fix(toPar()).apply(Future.DEFAULT_EXECUTOR)::get); }
public <R, B> ZIO<R, E, B> apply(Function1<? super A, ? extends ZIO<R, E, ? extends B>> use) { return resource.map(use.andThen(ZIOOf::<R, E, B>narrowK)).fold(ZIO::raiseError, identity()); }
ZIOResource implements AutoCloseable { public <R, B> ZIO<R, E, B> apply(Function1<? super A, ? extends ZIO<R, E, ? extends B>> use) { return resource.map(use.andThen(ZIOOf::<R, E, B>narrowK)).fold(ZIO::raiseError, identity()); } }
ZIOResource implements AutoCloseable { public <R, B> ZIO<R, E, B> apply(Function1<? super A, ? extends ZIO<R, E, ? extends B>> use) { return resource.map(use.andThen(ZIOOf::<R, E, B>narrowK)).fold(ZIO::raiseError, identity()); } ZIOResource(Either<E, ? extends A> resource, Consumer1<? super A> release); }
ZIOResource implements AutoCloseable { public <R, B> ZIO<R, E, B> apply(Function1<? super A, ? extends ZIO<R, E, ? extends B>> use) { return resource.map(use.andThen(ZIOOf::<R, E, B>narrowK)).fold(ZIO::raiseError, identity()); } ZIOResource(Either<E, ? extends A> resource, Consumer1<? super A> release); ZIO<R, E, B> apply(Function1<? super A, ? extends ZIO<R, E, ? extends B>> use); @Override void close(); }
ZIOResource implements AutoCloseable { public <R, B> ZIO<R, E, B> apply(Function1<? super A, ? extends ZIO<R, E, ? extends B>> use) { return resource.map(use.andThen(ZIOOf::<R, E, B>narrowK)).fold(ZIO::raiseError, identity()); } ZIOResource(Either<E, ? extends A> resource, Consumer1<? super A> release); ZIO<R, E, B> apply(Function1<? super A, ? extends ZIO<R, E, ? extends B>> use); @Override void close();  }