Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,8 @@
import Data.Set
a = fromList ["John", "Bob", "Mary", "Serena"]
b = fromList ["Jim", "Mary", "John", "Bob"]
(-|-) :: Ord a => Set a -> Set a -> Set a
x -|- y = (x \\ y) `union` (y \\ x)
-- Equivalently: (x `union` y) \\ (x `intersect` y)

View file

@ -0,0 +1,2 @@
*Main> a -|- b
fromList ["Jim","Serena"]

View file

@ -0,0 +1,5 @@
*Main> a \\ b
fromList ["Serena"]
*Main> b \\ a
fromList ["Jim"]