title: Given an array and predicate, find the first matching element
body: <p>Is there an existing function that finds the first array element that matches some general predicate?</p>
  
  <pre><code>$.fn.findFirstMatching = function(predicate) {
      var result;
      $.each(this, function(index, value) {
          if (predicate(index, value)) {
              result = {index: index, value: value};
          }
      });
      if (result) {
          return result;
      }
  };
  </code></pre>