title: Conditional value (like while loop) as method parameter
body: <p>So, I'm attempting to have a method that effectively does this:</p>
  
  <pre><code>- (void)doWhile: (/*some magical type*/)condition
  {
      while (condition)
      {
          // do some magical things
      }
  }
  </code></pre>
  
  <p>And while your first suggestion might be a <code>BOOL</code> consider the following exceptions:</p>
  
  <pre><code>[someObject doWhile: someOtherObject];
  // yes, I know that I could just do (someOtherObject != nil), but
  // I should be able to just use (someOtherObject), right?
  // seeing as how ifs/fors/whiles can use just the object.
  
  [someObject doWhile: [someOtherObject isValid]];
  // since -isValid returns a BOOL, this will work, but it will only
  // pass the value of -isValid at the time of calling to the while loop.
  // if the value of -isValid changes, -doWhile: will have no idea of the change,
  // whereas while() would.
  </code></pre>
  
  <p>The use of the primitive <code>_Bool</code> allows me to solve the former problem, however the latter problem still persists. Is there some way to evaluate the truthfulness of a type-agnostic parameter identically to how <code>while()</code> works?</p>