title: NSPredicate instead of loop to filter an array of objects
body: <p>I have been told that I can use <code>NSPredicate</code> to duplicate the results of this method</p>
  
  <pre><code>- (void) clearArrayOut
  {
      bool goAgain = false;
  
      for (int j=0; j&lt;[array count]; j++)
      {
          if ([[array objectAtIndex:j] someMethod] == NO)
          {
              [array removeObjectAtIndex:j];
              goAgain = true;
              break;
          }
      }
  
      if (goAgain) [self clearArrayOut];
  }
  </code></pre>
  
  <p>How can I make an <code>NSPredicate</code> that will filter an array based on the results of some method of a custom class's call?</p>