Overview
The toSet()
function deduplicates the elements in a list and converts it to a set. If provided with a non-list-type value, it wraps it into a set.
Syntax
toSet(value)
Augment |
Type |
Description |
---|---|---|
value |
Any | The value to be converted |
Return type: Set
Example of Result
return toSet([1,2,3,4,3,2])
Result: [4,3,1,2]
return toSet("abc")
Result: ["abc"]