Skip to content

Commit 29f528e

Browse files
committed
Define steps to create a Set from a List
1 parent 7351436 commit 29f528e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

infra.bs

+3
Original file line numberDiff line numberDiff line change
@@ -1694,6 +1694,9 @@ unordered one, since interoperability requires that any developer-exposed enumer
16941694
contents be consistent between browsers. In those cases where order is not important, we still use
16951695
ordered sets; implementations can optimize based on the fact that the order is not observable.
16961696

1697+
<p>To <dfn export for=set>create</dfn> a [=/set=] |result| from a [=/list=] |input|: for each [=list/item=] |item|
1698+
in |input|, [=set/append=] |item| to |result|.
1699+
16971700
<p>To <dfn export for=set>append</dfn> to an <a>ordered set</a>: if the set <a for=list>contains</a>
16981701
the given <a for=set>item</a>, then do nothing; otherwise, perform the normal <a>list</a>
16991702
<a for=list>append</a> operation.

0 commit comments

Comments
 (0)