Comparison

teal-src/util/set.d.tl @ 12617:36d77cc56ecb

util.set: Add teal type declaration file
author Kim Alvefur <zash@zash.se>
date Wed, 16 Feb 2022 16:42:22 +0100
comparison
equal deleted inserted replaced
12616:6b70d1af1fe3 12617:36d77cc56ecb
1 local record lib
2 record Set<T>
3 add : function<T> (Set<T>, T)
4 contains : function<T> (Set<T>, T) : boolean
5 contains_set : function<T> (Set<T>, Set<T>) : boolean
6 items : function<T> (Set<T>) : function<T> (Set<T>, T) : T
7 add_list : function<T> (Set<T>, { T })
8 include : function<T> (Set<T>, Set<T>)
9 exclude : function<T> (Set<T>, Set<T>)
10 empty : function<T> (Set<T>) : boolean
11 end
12
13 new : function<T> ({ T }) : Set<T>
14 is_set : function (any) : boolean
15 union : function<T> (Set<T>, Set<T>) : Set <T>
16 difference : function<T> (Set<T>, Set<T>) : Set <T>
17 intersection : function<T> (Set<T>, Set<T>) : Set <T>
18 xor : function<T> (Set<T>, Set<T>) : Set <T>
19 end
20
21 return lib