 
     IO.puts IO.ANSI.escape "Hello #[red,bright,green]yes#[reset]" #=>
     "Hello \e[31m\e[1m\e[32myes\e[0m"
-  """
-
-  @doc escape_fragment_doc
-  @spec escape_fragment(String.t) :: String.t
-  def escape_fragment(string) do
-    escape_fragment(string, terminal?)
-  end
-
-  @doc escape_fragment_doc
+
+  """
   @spec escape_fragment(String.t, emit :: boolean) :: String.t
-  def escape_fragment(string, emit) do
-    do_escape(string, false, emit,[])
-  end
-
+  def escape_fragment(string, emit // terminal?) do
+    do_escape(string, false, emit, [])
+  end
 
   defp do_escape(<< ?#, ?[, rest :: binary >>, false, emit, acc) do
     do_escape_sequence(rest, emit, acc)

defmodule IO.ANSI.Sequence do
  @moduledoc false
  defmacro __using__(_) do
    quote do
      import IO.ANSI.Sequence
    end
  end
  defmacro defsequence({name, _, [code]}) do
    defsequence(name, code)
  end
  def defsequence(name, code) do
    binary_name = atom_to_binary(name)
    quote do
      #@sequences {unquote(name), unquote(code), @doc}
      def unquote(name)() do
        "\e[#{unquote(code)}m"
      end
      defp escape_sequence(<< unquote(binary_name), rest :: binary >>) do
        {"\e[#{unquote(code)}m", rest}
      end
    end
  end

end

defmodule IO.ANSI do

    IO.puts IO.ANSI.escape "Hello #[red,bright,green]yes" #=>
    "Hello \e[31m\e[1m\e[32myes\e[0m"
  """
  @spec escape(String.t, emit :: boolean) :: String.t
  def escape(string, emit // terminal?) do
    do_escape(string <> "#[reset]", false, emit,[])
  end

  @doc %B"""
  Escapes a string coverting named ANSI sequences into actual ANSI codes.

  The format for referring sequences is `#[red]` and `#[red,bright]` (for
