From a7d7542dc646a5fd124ef71e71ce260889f1701b Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 2 Feb 2016 19:24:50 +0100 Subject: Moved to 1415 directory --- fp2/week3/mart/StdDynSet.icl | 54 -------------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 fp2/week3/mart/StdDynSet.icl (limited to 'fp2/week3/mart/StdDynSet.icl') diff --git a/fp2/week3/mart/StdDynSet.icl b/fp2/week3/mart/StdDynSet.icl deleted file mode 100644 index 1202ce2..0000000 --- a/fp2/week3/mart/StdDynSet.icl +++ /dev/null @@ -1,54 +0,0 @@ -implementation module StdDynSet - -import StdEnv -import StdDynamic - -class Set a | TC, ==, toString a - -:: Set = Set [Dynamic] - -instance zero Set -where zero = Set [] - -instance toString Set -where toString (Set a) = abort "toString not implemented" - -instance == Set -where - (==) (Set []) (Set []) = True - (==) (Set []) _ = False - (==) _ (Set []) = False - -toSet :: a -> Set | Set a -toSet a = Set [dynamic a] - -nrOfElts :: Set -> Int -nrOfElts (Set a) = length a - -isEmptySet :: Set -> Bool -isEmptySet (Set []) = True -isEmptySet _ = False - -memberOfSet :: a Set -> Bool | Set a -memberOfSet _ (Set []) = False -memberOfSet x (Set [y:xs]) -| isEqual x y = True -| otherwise = memberOfSet x xs - -isSubset :: Set Set -> Bool -isSubset a b = abort "isSubset nog niet geimplementeerd.\n" - -isStrictSubset :: Set Set -> Bool -isStrictSubset a b = abort "isStrictSubset nog niet geimplementeerd.\n" - -union :: Set Set -> Set -union a b = abort "union nog niet geimplementeerd.\n" - -intersection :: Set Set -> Set -intersection a b = abort "intersection nog niet geimplementeerd.\n" - -without :: Set Set -> Set -without a b = abort "without nog niet geimplementeerd.\n" - -Start :: Set -Start = toSet 1 -- cgit v1.2.3