diff options
Diffstat (limited to 'fp2/week3/camil/StdDynSet.dcl')
-rw-r--r-- | fp2/week3/camil/StdDynSet.dcl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/fp2/week3/camil/StdDynSet.dcl b/fp2/week3/camil/StdDynSet.dcl new file mode 100644 index 0000000..66964ad --- /dev/null +++ b/fp2/week3/camil/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 |