   URL encoded as per `encode/1`. Keys and values can be any term
   that implements the `String.Chars` protocol (i.e. can be converted
   to a binary).
+  
+  ## Examples
+
+      iex> hd = HashDict.new([{"foo", 1}, {"bar", "2"}])
+      #HashDict<[{"bar", "2"}, {"foo", 1}]>
+      iex> URI.encode_query(hd)
+      "bar=2&foo=1"
+
   """
   def encode_query(l), do: Enum.map_join(l, "&", &pair/1)
 

  @doc """
  Returns an iterator function over the query string that decodes
  the query string in steps.
  """
  def query_decoder(q) when is_binary(q) do
    fn(acc, fun) ->


  @doc """
  Percent-escape a URI.
  
  ## Example
  
      iex> URI.encode("http://elixir-lang.com/getting_started/2.html")
      "http%3A%2F%2Felixir-lang.com%2Fgetting_started%2F2.html"
      
  """
  def encode(s), do: bc(<<c>> inbits s, do: <<percent(c) :: binary>>)

