summaryrefslogtreecommitdiff
path: root/fp2/week3/camil/StdDynSet.dcl
blob: 160af6cb86c1c5409463473b1966f4b10274acb1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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