summaryrefslogtreecommitdiff
path: root/fp2/week3/camil/StdDynSet.dcl
blob: 66964ad37ef5cf9fa4efbf44c610822ff3f5f6de (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