1 implementation module StdDynSet
6 class Set a | TC, ==, toString a
14 where toString (Set a) = abort "toString not implemented"
17 where == a b = abort "== instance voor Set nog niet geimplementeerd.\n"
19 toSet :: a -> Set | Set a
20 toSet a = Set [dynamic a]
22 nrOfElts :: Set -> Int
23 nrOfElts (Set a) = length a
25 isEmptySet :: Set -> Bool
26 isEmptySet (Set []) = True
29 memberOfSet :: a Set -> Bool | Set a
30 memberOfSet _ (Set []) = False
31 memberOfSet x (Set [y:xs])
33 | otherwise = memberOfSet x xs
35 isSubset :: Set Set -> Bool
36 isSubset a b = abort "isSubset nog niet geimplementeerd.\n"
38 isStrictSubset :: Set Set -> Bool
39 isStrictSubset a b = abort "isStrictSubset nog niet geimplementeerd.\n"
41 union :: Set Set -> Set
42 union a b = abort "union nog niet geimplementeerd.\n"
44 intersection :: Set Set -> Set
45 intersection a b = abort "intersection nog niet geimplementeerd.\n"
47 without :: Set Set -> Set
48 without a b = abort "without nog niet geimplementeerd.\n"