For the complete documentation index, see llms.txt. This page is also available as Markdown.

SetOf

Build a default (hash-backed) Set from positional arguments, silently deduplicating as it goes.

Internal runtime slots (arguments prefixed with {@code __} or the argumentCollection key) are automatically skipped. Equivalent to calling setNew() followed by setAdd() for each value.

Method Signature

SetOf()

Arguments

This function does not accept any arguments

Examples

Create a Set from positional varargs

Duplicate values are automatically removed.

s = setOf( 1, 2, 2, 3 );
writeOutput( s.size() );

Result: 3

All values must be the same conceptual type after normalization

Numerically equal values are treated as duplicates even when passed as different literals.

Result: 1

Last updated

Was this helpful?