   end
 
   @doc """
-  Iterates the collection passing an accumulator as parameter.
+  Invokes `fun` for each element in the collection passing the accumulator
+  `acc` and the element as arguments. The return value is stored in `acc`.
   Returns the accumulator.
 
   ## Examples

      #=> 6

  """
  def reduce(collection, acc, f) when is_list(collection) do
    :lists.foldl(f, acc, collection)
  end

  def reduce(collection, acc, f) do
    { iterator, pointer } = I.iterator(collection)
    reduce(iterator, pointer, acc, f)
  end

  def reduce(iterator, pointer, acc, f) do
    do_reduce(pointer, iterator, acc, f)
  end

  @doc """

  @doc """
  Invokes the given `fun` for each item in the `collection`
  while also keeping an accumulator. Returns a tuple where
  the first element is the mapped collection and the second
  one is the final accumulator.

  ## Examples
