 
   """
   @spec equal?(t, t) :: boolean
-  def equal?(%MapSet{map: map1}, %MapSet{map: map2}) do
+  def equal?(%MapSet{data: map1}, %MapSet{data: map2}) do
     Map.equal?(map1, map2)
   end
 

  # If the first set is less than twice the size of the second map,
  # it is fastest to re-accumulate items in the first set that are not
  # present in the second set.
  def difference(%MapSet{map: map1}, %MapSet{map: map2})
      when map_size(map1) < map_size(map2) * 2 do
    map = map1
    |> Map.keys
    |> filter_not_in(map2)

    %MapSet{map: map}
  end

  # If the second set is less than half the size of the first set, it's fastest
  # to simply iterate through each item in the second set, deleting them from
  # the first set.
  def difference(%MapSet{map: map1}, %MapSet{map: map2}) do
    %MapSet{map: Map.drop(map1, Map.keys(map2))}
  end

  defp filter_not_in(keys, map2, acc \\ [])

      |> Enum.to_list
      |> new_from_list([])

    %MapSet{data: map}
  end

  @doc """
