       #=> HashDict[{ "a", "a" }, { "b", "b" }]
 
   """
+  @spec new(list, (term -> {key :: term, key :: term})) :: t
   def new(list, transform) when is_function(transform) do
     Enum.reduce list, new(), fn i, dict ->
       { k, v } = transform.(i)

  @doc """
  Returns the dict size.
  """
  def size(dict) do
    elem(dict, 1)
  end

  @doc """
  Get all values in the dict.
  """
  @spec values(t) :: list(values :: term)
  def values(dict) do
    dict_fold(dict, [], fn { _, v }, acc -> [v|acc] end)
  end
