 
   @doc """
   Folds a list of document entities into a document entity
-  using a function that is passed as the first argument.
-
-  ## Examples
-
-      iex> doc = ["A", "B"]
-      iex> doc = Inspect.Algebra.fold_doc(doc, fn(x, y) ->
-      ...>   Inspect.Algebra.concat [x, "!", y]
+  using the given folder function.
+
+  The list of document is folded "from the right"; in that, this function is
+  similar to `List.foldr/3`, except that it doesn't expect an initial
+  accumulator and uses the last element of `docs` as the initial accumulator.
+
+  ## Examples
+
+      iex> doc = ["A", "B", "C"]
+      iex> doc = Inspect.Algebra.fold_doc(doc, fn(d, acc) ->
+      ...>   Inspect.Algebra.concat([d, "!", acc])
       ...> end)
       iex> Inspect.Algebra.format(doc, 80)
-      ["A", "!", "B"]
+      ["A", "!", "B", "!", "C"]
 
   """
   @spec fold_doc([t], ((t, t) -> t)) :: t

  @doc ~S"""
  Maps and glues a collection of items.

  It uses the given left and right as surrounding and a separator for
  each item. A limit can be passed which, once reached, stops gluing
  and outputs "..." instead.

  ## Examples


  ## Examples

      iex> doc = Inspect.Algebra.space "Hughes", "Wadler"
      iex> Inspect.Algebra.format(doc, 5)
      ["Hughes", " ", "Wadler"]

  """
