Set Container (#Set)

Sets are balanced skip lists of key/value pairs. The keys are unique. The values are set automatically by Glee as never repeating integers. The value begins with the integer 1 and increases with each new key added to the set. If a key is added twice, the second add is ignored. When a key is deleted, its integer value is never reused. While the syntax of Glee requires that a value be supplied in assigning a key to a set (e.g. value=>['key']set), the value is always ignored. A set is exactly like a dictionary (i.e. unique keys, unique associations). However, where the user may set both the key and value for a dictionary entry, he has no choice on the value of the set entry. Further, he cannot use an number as a key for a set. This is because Glee retrieves keys by their assigned integer through normal indexing.

Commentary Code Result
Commentary #set =>s;
nv=>['a']s;
nv=>['a']s;
nv=>['b']s;
s:seq %**$;
Seq[R2C2:K]
[1]Seq[R1C2:K]
*[1]String[R3C1:C]a
*[2]Num[R3C1:I]1
[2]Seq[R1C2:K]
*[1]String[R3C1:C]b
*[2]Num[R3C1:I]2
Commentary #set => s;
'<1>'(nv=>['a']s;s['a']%**)$;
'<2>'(nv=>['b']s;s['b']%**)$;
'<3>'(s['x']%**)$;
'<4>'(s[1]%**)$;
'<5>'(s[2]%**)$;
'<6>'(s[1 2]%**)$;
'<7>'(s['a''b']%**)$;
'<8>'(s['x'10 'a' 2]%**)$;
<1>Seq[R1C1:K]
[1]Num[R3C1:I]1
<2>Seq[R1C1:K]
[1]Num[R3C1:I]2
<3>Seq[R1C1:K]
[1]NV:
<4>Seq[R1C1:K]
[1]String[R3C1:C]a
<5>Seq[R1C1:K]
[1]String[R3C1:C]b
<6>Seq[R1C2:K]
[1]String[R3C1:C]a
[2]String[R3C1:C]b
<7>Seq[R1C2:K]
[1]Num[R3C1:I]1
[2]Num[R3C1:I]2
<8>Seq[R1C4:K]
[1]NV:
[2]NV:
[3]Num[R3C1:I]1
[4]String[R3C1:C]b
Commentary #set =>s;
nv=>['a']s;
nv=>['a']s;
nv=>['b']s;
s~'a';
s:seq %**$;
Seq[R2C1:K]
[1]Seq[R1C2:K]
*[1]String[R3C1:C]b
*[2]Num[R3C1:I]2
Commentary #set =>s;
nv=>['a']s;
nv=>['a']s;
nv=>['b']s;
s~'a';
'<1>'(s:seq %**)$;
nv=>['a']s;
'<2>'(s:seq %**)$;
<1>Seq[R2C1:K]
[1]Seq[R1C2:K]
*[1]String[R3C1:C]b
*[2]Num[R3C1:I]2
<2>Seq[R2C2:K]
[1]Seq[R1C2:K]
*[1]String[R3C1:C]a
*[2]Num[R3C1:I]3
[2]Seq[R1C2:K]
*[1]String[R3C1:C]b
*[2]Num[R3C1:I]2