code: public static <R, E> List<R> map(Iterable<E> iterable, Function<E, R> function) {
          dbc.precondition(iterable != null, "cannot map from a null iterable");
          final TransformingIterator<E, R> transformed = new TransformingIterator<>(iterable.iterator(), function);
          final Function<Iterator<R>, ArrayList<R>> consumer = new ConsumeIntoCollection<>(new ArrayListFactory<R>());
          return consumer.apply(transformed);
      }
docs: Creates a List yielding the result of the transformation applied by the
  function on the elements of the source iterable. This transformation is
  evaluated eagerly. E.g:
  <code>
  map([1,2,3], toStringTransformer) -> ["1", "2", "3"]
  </code>
  
  @param <R> the result iterator element type parameter
  @param <E> the input array element type parameter
  @param iterable the iterable where elements are fetched from
  @param function a function used to transform each element
  @return a List containing the transformed elements