code: public static <T> Collection<T> take(Iterable<T> iterable, int count)
      {
          if (iterable instanceof ArrayList)
          {
              return ArrayListIterate.take((ArrayList<T>) iterable, count);
          }
          if (iterable instanceof RandomAccess)
          {
              return RandomAccessListIterate.take((List<T>) iterable, count);
          }
          if (iterable instanceof Collection)
          {
              return IterableIterate.take(
                      iterable,
                      count,
                      DefaultSpeciesNewStrategy.INSTANCE.<T>speciesNew((Collection<T>) iterable, count));
          }
          if (iterable != null)
          {
              return IterableIterate.take(iterable, count);
          }
          throw new IllegalArgumentException("Cannot perform a take on null");
      }
docs: Returns the first {@code count} elements of the iterable
  or all the elements in the iterable if {@code count} is greater than the length of
  the iterable.
  
  @param iterable the collection to take from.
  @param count    the number of items to take.
  @return a new list with the items take from the given collection.
  @throws IllegalArgumentException if {@code count} is less than zero