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