src/Set.php
public function intersect(Set $set): Set
    {
        return $this->table->intersect($set->table)->keys();
    }
public function intersect(Set $set): Set
    {
        return $this->table->intersect($set->table)->keys();
    }
public function intersect ( Set $ set ) : Set { return $ this -> table -> intersect ( $ set -> table ) -> keys ( ) ; }
Creates a new set using values common to both this set and another set.

In other words, returns a copy of this set with all values removed that
aren't in the other set.

Formally: A ∩ B = {x : x ∈ A ∧ x ∈ B}

@param Set $set

@return Set
Creates a new set using values common to both this set and another set .