diff options
Diffstat (limited to 'sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/core.kt')
-rw-r--r-- | sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/core.kt | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/core.kt b/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/core.kt index 47b3d559..cfed7f32 100644 --- a/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/core.kt +++ b/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/core.kt @@ -23,16 +23,11 @@ import arrow.core.Either import arrow.core.ForOption import arrow.core.Option import arrow.core.Try +import arrow.core.extensions.option.monad.monad import arrow.core.fix import arrow.core.identity -import arrow.effects.ForIO -import arrow.effects.IO -import arrow.effects.fix -import arrow.effects.instances.io.monad.monad -import arrow.instances.option.monad.monad import arrow.syntax.collections.firstOption import arrow.typeclasses.MonadContinuation -import arrow.typeclasses.binding import reactor.core.publisher.Flux import reactor.core.publisher.Mono import java.util.concurrent.atomic.AtomicReference @@ -47,11 +42,6 @@ object OptionUtils { : Option<A> = Option.monad().binding(c).fix() } -object IOUtils { - fun <A> binding(c: suspend MonadContinuation<ForIO, *>.() -> A) - : IO<A> = IO.monad().binding(c).fix() -} - fun <A> Either<A, A>.flatten() = fold(::identity, ::identity) fun <B> Either<Throwable, B>.rightOrThrow() = fold({ throw it }, ::identity) |