<div dir="ltr"><div>Hey all,<br><br></div><div>I've found myself reaching for the following function a couple of times now, so I figured it might make a good addition.</div><div><br></div><div>  intersections :: Ord a => NonEmpty (Set a) -> Set a<br>  intersections (s :| ss) = Foldable.foldl' intersection s ss</div><div><br></div><div>In a similar vein, we may as well add the following newtype + instance combo:<br></div><div><br></div><div>  newtype Intersection a = Intersection { getIntersection :: Set a }</div><div><br></div><div>  instance (Ord a) => Semigroup (Intersection a) where<br>      (Intersection a) <> (Intersection b) = Intersection $ intersection a b<br>      stimes = stimesIdempotent</div><div><br></div><div>Would love to hear everyone's thoughts on this!<br><br></div><div>Thanks<br></div><div>Reed Mullanix<br></div></div>