import arrow.resilience.Schedule
suspend fun main() {
var result = ""
Schedule
.doWhile<String> { input, output -> input.length <= 5 }
.repeat {
result += "a"
result
}
println(result)
}
.
You're right that in this case the second argument is a bit redundant, and could be removed at the cost of an additional lambda in the internals of Arrow.
It's implementation