File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1568,6 +1568,11 @@ <h3 id="sets">Sets</h3>
1568
1568
< div class ="hgroup-inline ">
1569
1569
< div class ="panel ">
1570
1570
< p > Sets are represented as ordered arrays without duplicates.</ p >
1571
+ < p >
1572
+ Note that the < code > std.set*</ code > functions rely on the uniqueness and ordering
1573
+ on arrays passed to them to work. This can be guarenteed by using < code > std.set(arr)< code > .
1574
+ If that is not the case, the functions will quietly return non-meaningful results.
1575
+ </ p >
1571
1576
</ div >
1572
1577
< div style ="clear: both "> </ div >
1573
1578
</ div >
@@ -1625,10 +1630,14 @@ <h4 id="setUnion">std.setUnion(a, b)</h4>
1625
1630
< div class ="hgroup-inline ">
1626
1631
< div class ="panel ">
1627
1632
< p >
1628
- Set union operation (values in either a or b ). Note that + on sets will simply concatenate
1629
- the arrays, possibly forming an array that is not a set (due to not bein ordered without
1633
+ Set union operation (values in any of < code > a </ code > or < code > b </ code > ). Note that + on sets will simply concatenate
1634
+ the arrays, possibly forming an array that is not a set (due to not being ordered without
1630
1635
duplicates).
1631
1636
</ p >
1637
+ < p >
1638
+ Example1: < code > std.setUnion([1, 2], [2, 3])</ code > yields
1639
+ < code > [1, 2, 3]</ code > .
1640
+ </ p >
1632
1641
</ div >
1633
1642
< div style ="clear: both "> </ div >
1634
1643
</ div >
You can’t perform that action at this time.
0 commit comments