defmodule Atom do
  @doc """
  Convenience functions for working with atoms.
  """

  @doc """
  Converts an atom to string.

  Inlined by the compiler.
  """
  @spec to_string(atom) :: String.t
  def to_string(atom) do
    :erlang.atom_to_binary(atom, :utf8)
  end

  @doc """
  Converts an atom to a char list.

  Inlined by the compiler.
  """
  @spec to_char_list(atom) :: char_list
  def to_char_list(atom) do
    :erlang.atom_to_list(atom)
  end
end

defmodule Atom do
  @moduledoc """
  Convenience functions for working with atoms.

  See also `Kernel.is_atom/1`.
  """

  @doc """
  Converts an atom to a string.

  Inlined by the compiler.

  ## Examples

      iex> Atom.to_string(:foo)
      "foo"

  """
  @spec to_string(atom) :: String.t
  def to_string(atom) do
    :erlang.atom_to_binary(atom, :utf8)
  end

  @doc """
  Converts an atom to a char list.

  Inlined by the compiler.

  ## Examples

      iex> Atom.to_char_list(:"An atom")
      'An atom'

  """
  @spec to_char_list(atom) :: char_list
  def to_char_list(atom) do
    :erlang.atom_to_list(atom)
  end
end

Fix some docs in the `Atom` module
Fix some docs in the `Atom` module

- Changed a `@doc` to `@moduledoc` so that the `Atom` module has a module
  documentation
- Added examples to both `Atom.to_string/1` and `Atom.to_char_list/1`

ggcampinho/elixir,ggcampinho/elixir,gfvcastro/elixir,antipax/elixir,joshprice/elixir,antipax/elixir,lexmag/elixir,beedub/elixir,pedrosnk/elixir,kimshrier/elixir,lexmag/elixir,kelvinst/elixir,kelvinst/elixir,michalmuskala/elixir,kimshrier/elixir,elixir-lang/elixir,beedub/elixir,pedrosnk/elixir,gfvcastro/elixir