You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
testIntersection :: Set Int -> Set Int -> Bool
testIntersection = checkProperties [propOnlyNotInLeftSet, propNotOnlyInLeftSet, propOnlyNotInRightSet, propNotOnlyInRightSet, propInBothSets] setIntersection
testUnion :: Set Int -> Set Int -> Bool
testUnion = checkProperties [propOnlyInLeftSet, propOnlyNotInLeftSet, propOnlyInRightSet, propOnlyNotInRightSet, propInBothSets] setUnion
testDifference :: Set Int -> Set Int -> Bool
testDifference = checkProperties [propOnlyInLeftSet, propNotOnlyNotInLeftSet, propNotOnlyNotInRightSet, propNotInBothSets] setDifference
Nice original code!
Ex 6
trClos :: Ord a => Rel a -> Rel a
trClos clos
| clos == x = sort clos
| otherwise = trClos x
where x = nub $ clos ++ (clos @@ clos)
This will work but does a step too much. Nicer:
trClos :: Ord a => Rel a -> Rel a
trClos clos
| clos == x = sort clos
| otherwise = trClos x
where x = (sort.nub) $ clos ++ (clos @@ clos)
The text was updated successfully, but these errors were encountered:
Ex. 3
Nice original code!
Ex 6
This will work but does a step too much. Nicer:
The text was updated successfully, but these errors were encountered: