       "a b"
 
   Notice the break was represented as is, because we haven't reached
-  a line limit. Once we do, it is replaced by a new line:
+  a line limit. Once we do, it is replaced by a newline:
 
       iex> doc = Inspect.Algebra.glue(String.duplicate("a", 20), " ", "b")
       iex> Inspect.Algebra.pretty(doc, 10)
       "aaaaaaaaaaaaaaaaaaaa\nb"
 
   Finally, this module also contains Elixir related functions, a bit
-  tied up to Elixir formatting, namely `surround/3` and `surround_many/5`.
+  tied to Elixir formatting, namely `surround/3` and `surround_many/5`.
 
   ## Implementation details
 
   The original Haskell implementation of the algorithm by [Wadler][1]
   relies on lazy evaluation to unfold document groups on two alternatives:
-  `:flat` (breaks as spaces) and `:broken` (breakes as newlines).
-  Implementing the same logic on a strict language such as Elixir leads
-  to an exponential growth of the possible documents, unless document
+  `:flat` (breaks as spaces) and `:broken` (breaks as newlines).
+  Implementing the same logic in a strict language such as Elixir leads
+  to an exponential growth of possible documents, unless document
   groups are encoded explictly as `:flat` or `:broken`. Those groups are
   then reduced to a simple document, where the layout is already decided,
   per [Lindig][0].
 
   Custom pretty printers can be implemented using the documents returned
-  by this module and by providing its own rendenring functions.
+  by this module and by providing their own rendering functions.
 
     [0]: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.2200
     [1]: http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf

  defrecordp :doc_group, :doc_group, [doc: :doc_nil]

  @doc """
  Returns :doc_nil which is a document entity used to represent
  nothingness. Takes no arguments.

  ## Examples

  def concat(docs), do: folddoc(docs, concat(&1, &2))

  @doc """
  Nests document entity `x` positions deep. Nesting will be
  appended to the line breaks.

  ## Examples
