cycleWhile

fun cycleWhile(condition: (AggregateResult<ID, R>) -> Boolean): R

Apply the aggregate function to the parameters of the device while the condition is satisfied, then returns the result of the computation.