From dfa35e5217b21c8ea8e10a1128c50d07e67c056b Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 16 Feb 2022 16:42:22 +0100 Subject: util.set: Add teal type declaration file --- teal-src/util/set.d.tl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 teal-src/util/set.d.tl (limited to 'teal-src/util') diff --git a/teal-src/util/set.d.tl b/teal-src/util/set.d.tl new file mode 100644 index 00000000..1631eec4 --- /dev/null +++ b/teal-src/util/set.d.tl @@ -0,0 +1,21 @@ +local record lib + record Set + add : function (Set, T) + contains : function (Set, T) : boolean + contains_set : function (Set, Set) : boolean + items : function (Set) : function (Set, T) : T + add_list : function (Set, { T }) + include : function (Set, Set) + exclude : function (Set, Set) + empty : function (Set) : boolean + end + + new : function ({ T }) : Set + is_set : function (any) : boolean + union : function (Set, Set) : Set + difference : function (Set, Set) : Set + intersection : function (Set, Set) : Set + xor : function (Set, Set) : Set +end + +return lib -- cgit v1.2.3