Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add merge function for *Effect #2752

Merged
merged 4 commits into from Jul 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions arrow-libs/core/arrow-core/api/arrow-core.api
Expand Up @@ -2614,6 +2614,7 @@ public final class arrow/core/continuations/EagerEffect$DefaultImpls {

public final class arrow/core/continuations/EagerEffectKt {
public static final fun eagerEffect (Lkotlin/jvm/functions/Function2;)Larrow/core/continuations/EagerEffect;
public static final fun merge (Larrow/core/continuations/EagerEffect;)Ljava/lang/Object;
}

public abstract interface class arrow/core/continuations/EagerEffectScope {
Expand Down Expand Up @@ -2670,6 +2671,7 @@ public final class arrow/core/continuations/Effect$DefaultImpls {

public final class arrow/core/continuations/EffectKt {
public static final fun effect (Lkotlin/jvm/functions/Function2;)Larrow/core/continuations/Effect;
public static final fun merge (Larrow/core/continuations/Effect;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}

public abstract interface class arrow/core/continuations/EffectScope {
Expand Down
Expand Up @@ -200,3 +200,5 @@ private class DefaultEagerEffect<R, A>(private val f: suspend EagerEffectScope<R
}

private const val deprecateMonadAppFunctorOperators: String = "Operators related to Functor, Applicative or Monad hierarchies are being deprecated in favor of bind"

public fun <A> EagerEffect<A, A>.merge(): A = fold(::identity, ::identity)
Expand Up @@ -788,3 +788,5 @@ private class DefaultEffect<R, A>(private val f: suspend EffectScope<R>.() -> A)
}
}
}

public suspend fun <A> Effect<A, A>.merge(): A = fold(::identity, ::identity)