   defp new_from_list_transform([], _fun, acc) do
     :maps.from_list(acc)
   end
+
   defp new_from_list_transform([item | rest], fun, acc) do
     new_from_list_transform(rest, fun, [{fun.(item), @dummy_value} | acc])
   end

  end

  defp map_subset?([], _), do: true
  defp map_subset?([key | rest], map2) do
    match?(%{^key => _}, map2) and map_subset?(rest, 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}
