arrow-core / arrow.core.extensions / AndThenMonad / tailRecM
open fun <A, B> tailRecM(a: A, f: (A) -> AndThenOf<X, Either<A, B>>): AndThen<X, B>
Do you like Arrow?