whileTrue

infix inline fun Predicate.whileTrue(code: Block)

evaluates the supplied code block as long as the receiver predicate evaluates to true.

Parameters

<receiver>

Predicate

code

block of code to execute while the predicate evaluates to true