code: public static <T> Collection<T> takeWhile(Iterable<T> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure condition) {
          Collection<T> result = createSimilarCollection(self);
          addAll(result, takeWhile(self.iterator(), condition));
          return result;
      }
docs: Returns a Collection containing the longest prefix of the elements from this Iterable
  where each element passed to the given closure evaluates to true.
  <pre class="groovyTestCase">
  class AbcIterable implements Iterable<String> {
  Iterator<String> iterator() { "abc".iterator() }
  }
  def abc = new AbcIterable()
  assert abc.takeWhile{ it {@code <} 'b' } == ['a']
  assert abc.takeWhile{ it {@code <=} 'b' } == ['a', 'b']
  </pre>
  
  @param self      an Iterable
  @param condition the closure that must evaluate to true to
  continue taking elements
  @return a Collection containing a prefix of the elements from the given Iterable where
  each element passed to the given closure evaluates to true
  @since 1.8.7