   """
 
   @opaque t :: %__MODULE__{map: map}
+  @type value :: term
   defstruct map: %{}
 
   @doc """


  """
  @spec intersection(t, t) :: t
  def intersection(%MapSet{} = set1, %MapSet{} = set2) do
    if size(set1) > size(set2), do: {set1, set2} = {set2, set1}
    reduce(set1, {:cont, new}, fn value, acc ->
      if member?(set2, value) do
        {:cont, put(acc, value)}
      else
        {:cont, acc}
      end
    end) |> elem(1)
  end

  @doc """


  """
  @spec subset?(t, t) :: boolean
  def subset?(%MapSet{map: map1}, %MapSet{map: map2}) do
    if map_size(map1) <= map_size(map2) do
      :maps.fold(fn value, _, _ ->
        if Map.has_key?(map2, value) do
          true
        else
          throw({:halt, false})
        end
      end, true, map1)
    else
      false
    end
  catch
    {:halt, false} -> false
  end

  @doc """
