Module Set
A simple set implementation.
Info:
- Copyright: Copyright (c) 2013 - 2022 Snowplow Analytics Ltd
- License: Apache License Version 2.0
- Author: Alex Dean
set.new_set (t) |
Creates a new set from the supplied table. |
contains (value) |
Checks if a value is in the set. |
to_string () |
Convert a set to a string key-sorted string representation
Source: http://www.lua.org/pil/13.1.html |
-
set.new_set (t)
-
Creates a new set from the supplied table.
Source: http://www.lua.org/pil/13.1.html
Parameters:
- t
tab
The table containing the values for this set
Returns:
Set
The new set
-
contains (value)
-
Checks if a value is in the set.
Parameters:
- value
The value to look for in our set
Returns:
bool
If the set contains the value
-
to_string ()
-
Convert a set to a string key-sorted string representation
Source: http://www.lua.org/pil/13.1.html
Returns:
string
The string representation of the set
-
Set
-
The set table.
Fields:
- new_set
func
- contains
func
- to_string
func