t -->
<p>Apply a function to an initial state while some predicate is satisfied. </p>
<p>This method is a natural extension of the <code>while</code> language construct to manipulate a state whose type may change from one iteration to another. However, note that having a state whose type changes from one iteration to the other is only possible as long as the predicate returns a <code>Logical</code> whose truth value is known at compile-time.</p>
<p>Specifically, <code>while_(pred, state, f)</code> is equiva