pub fn intersect(&self, other: &Self) -> Self {
        let mut intersection = Self::new();
        for x in self.cloned_iter() {
            if !other.contains(&x) {
                continue;
            }
            assert!(intersection.add(x).is_ok());
        }
        intersection
    }
// intersection of two sets. Keeps the loc of the first set
intersection of two sets. Keeps the loc of the first set
intersection of two sets . Keeps the loc of the first set
pub fn intersect(&self, other: &Self) -> Self {
        let mut intersection = Self::new();
        for x in self.cloned_iter() {
            if !other.contains(&x) {
                continue;
            }
            assert!(intersection.add(x).is_ok());
        }
        intersection
    }
pub fn intersect ( & self , other : & Self ) -> Self { let mut intersection = Self :: new ( ) ; for x in self . cloned_iter ( ) { if ! other . contains ( & x ) { continue ; } assert ! ( intersection add ( x ) is_ok ( ) ) ; } intersection }
intersection of two sets.
intersection of two sets .
&self
other
&Self