   end
 
   @doc """
-  Invokes the given `fun` for each item in the `collection`
-  partitioning it in two lists.
+  Partitions `collection` into two lists where the first one contains elements
+  for which `fun` returns a truthy value, and the second one -- for which `fun`
+  returns false or nil.
 
   ## 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
