arrow-core / arrow.core.extensions / EitherMonad / tailRecM
open fun <A, B> tailRecM(a: A, f: (A) -> EitherOf<L, Either<A, B>>): Either<L, B>
Do you like Arrow?