4interface SetSig a where
5 data Set : Type -> Type
8 insert : a -> Set a -> Set a
9 member : a -> Set a -> Bool
11data Tree a = Leaf | Node (Tree a) a (Tree a)
18 [TreeSet] Ord a => SetSig a where
24 insert x Leaf = Node Leaf x Leaf
25 insert x (Node l val r) = case compare x val of
26 LT => Node (insert x l) val r
28 GT => Node l val (insert x r)
31 member x (Node l val r) = case compare x val of
36using implementation TreeSet
38 test : Set @{TreeSet {a=Nat}} Nat
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list