diff --git a/arrow-libs/fx/arrow-fx-coroutines-test/src/jvmTest/kotlin/arrow/fx/coroutines/PredefTest.kt b/arrow-libs/fx/arrow-fx-coroutines-test/src/jvmTest/kotlin/arrow/fx/coroutines/PredefTest.kt
index b6eda368a9f..6ede23a21cc 100644
--- a/arrow-libs/fx/arrow-fx-coroutines-test/src/jvmTest/kotlin/arrow/fx/coroutines/PredefTest.kt
+++ b/arrow-libs/fx/arrow-fx-coroutines-test/src/jvmTest/kotlin/arrow/fx/coroutines/PredefTest.kt
@@ -1,5 +1,6 @@
package arrow.fx.coroutines
+import arrow.core.Either
import io.kotest.matchers.shouldBe
import io.kotest.property.Arb
import io.kotest.property.arbitrary.int
diff --git a/arrow-libs/fx/arrow-fx-coroutines/api/arrow-fx-coroutines.api b/arrow-libs/fx/arrow-fx-coroutines/api/arrow-fx-coroutines.api
index 749ee0204ab..2d5969e3fca 100644
--- a/arrow-libs/fx/arrow-fx-coroutines/api/arrow-fx-coroutines.api
+++ b/arrow-libs/fx/arrow-fx-coroutines/api/arrow-fx-coroutines.api
@@ -395,8 +395,11 @@ public abstract class arrow/fx/coroutines/Schedule {
public final fun or (Larrow/fx/coroutines/Schedule;)Larrow/fx/coroutines/Schedule;
public abstract fun pipe (Larrow/fx/coroutines/Schedule;)Larrow/fx/coroutines/Schedule;
public final fun repeat (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
+ public final fun repeatAsFlow (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun repeatOrElse (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
+ public final fun repeatOrElseAsFlow (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun repeatOrElseEither (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
+ public abstract fun repeatOrElseEitherAsFlow (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun untilInput (Lkotlin/jvm/functions/Function2;)Larrow/fx/coroutines/Schedule;
public final fun untilOutput (Lkotlin/jvm/functions/Function2;)Larrow/fx/coroutines/Schedule;
public final fun void ()Larrow/fx/coroutines/Schedule;
diff --git a/arrow-libs/fx/arrow-fx-coroutines/src/commonMain/kotlin/arrow/fx/coroutines/Schedule.kt b/arrow-libs/fx/arrow-fx-coroutines/src/commonMain/kotlin/arrow/fx/coroutines/Schedule.kt
index ca7bca1aa13..6e76aeafebc 100644
--- a/arrow-libs/fx/arrow-fx-coroutines/src/commonMain/kotlin/arrow/fx/coroutines/Schedule.kt
+++ b/arrow-libs/fx/arrow-fx-coroutines/src/commonMain/kotlin/arrow/fx/coroutines/Schedule.kt
@@ -19,6 +19,10 @@ import kotlin.random.Random
import kotlin.time.Duration
import kotlin.time.ExperimentalTime
import kotlin.time.nanoseconds
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.flow
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.flow.retry
/**
* # Retrying and repeating effects
@@ -217,6 +221,28 @@ public sealed class Schedule {
public suspend fun repeatOrElse(fa: suspend () -> Input, orElse: suspend (Throwable, Output?) -> Output): Output =
repeatOrElseEither(fa, orElse).fold(::identity, ::identity)
+ public abstract suspend fun repeatOrElseEitherAsFlow(
+ fa: suspend () -> Input,
+ orElse: suspend (Throwable, Output?) -> C
+ ): Flow>
+
+ /**
+ * Runs this effect and emits the output, if it succeeded, decide using the provided policy if the effect should be repeated and emitted, if so, with how much delay.
+ * This will raise an error if a repeat failed.
+ */
+ public suspend fun repeatAsFlow(fa: suspend () -> Input): Flow