       ["a", "b", "c"]
 
   """
-  @spec concat([t]) :: doc_cons
-  def concat(docs) do
+  @spec concat([t]) :: t
+  def concat(docs) when is_list(docs) do
     fold_doc(docs, &concat(&1, &2))
   end
 

      ["hello", "\t", "world"]

  """
  @spec glue(t, binary, t) :: doc_cons
  def glue(x, g, y) when is_binary(g), do: concat(x, concat(break(g), y))

  @doc ~S"""
  Returns a group containing the specified document.

  ## Examples


      "[1! 2! 3! ...]"
  """
  @spec surround_many(binary, [any], binary, Inspect.Opts.t, (term, Inspect.Opts.t -> t), binary) :: t
  def surround_many(left, docs, right, %Inspect.Opts{} = opts, fun, separator \\ @surround_separator)
      when is_function(fun, 2) do
    do_surround_many(left, docs, right, opts.limit, opts, fun, separator)
  end

