diff options
author | Mart Lubbers | 2015-04-28 13:24:26 +0200 |
---|---|---|
committer | Mart Lubbers | 2015-04-28 13:24:26 +0200 |
commit | ef7e606696bd307c03e3e46f2245b8b56b307f9f (patch) | |
tree | 38ec2df7180e9c6451429e2a7ecc286b0d562011 /fp2/week3/mart/StdDynSet.dcl | |
parent | finally, week2 done:) (diff) |
week3 jow
Diffstat (limited to 'fp2/week3/mart/StdDynSet.dcl')
-rw-r--r-- | fp2/week3/mart/StdDynSet.dcl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/fp2/week3/mart/StdDynSet.dcl b/fp2/week3/mart/StdDynSet.dcl new file mode 100644 index 0000000..de9a9b7 --- /dev/null +++ b/fp2/week3/mart/StdDynSet.dcl @@ -0,0 +1,24 @@ +definition module StdDynSet
+
+import StdOverloaded
+
+class Set a | TC, ==, toString a
+
+:: Set
+
+instance zero Set
+instance toString Set
+instance == Set
+
+toSet :: a -> Set | Set a
+
+nrOfElts :: Set -> Int
+isEmptySet :: Set -> Bool
+
+memberOfSet :: a Set -> Bool | Set a
+isSubset :: Set Set -> Bool
+isStrictSubset :: Set Set -> Bool
+
+union :: Set Set -> Set
+intersection :: Set Set -> Set
+without :: Set Set -> Set
|