Skip to content

Commit 7f8c8ee

Browse files
Add list reverse
For whatwg/html#12345.
1 parent 6eca7ae commit 7f8c8ee

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

infra.bs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,6 +1675,10 @@ a new <a>ordered set</a> |clone|, so that <a for=set>replacing</a> "<code>a</cod
16751675
"<code>foo</code>" in |clone| gives « "<code>foo</code>", "<code>b</code>", "<code>c</code>" »,
16761676
while |original|[0] is still the <a>string</a> "<code>a</code>".
16771677

1678+
<p>To <dfn export for=list,stack,queue,set>reverse</dfn> a <a>list</a> |list| is to create a new
1679+
<a>list</a> |reversed|, of the same designation, and, <a for=list>for each</a> |item| of |list|,
1680+
<a for=list>prepend</a> |item| to |reversed|.
1681+
16781682
<p>To <dfn export for=list,stack,queue,set lt="sort in ascending order|sorting in ascending order|sort|sorting">sort in ascending order</dfn>
16791683
a <a>list</a> |list|, with a less than algorithm |lessThanAlgo|, is to create a new <a>list</a>
16801684
|sorted|, containing the same <a for=list>items</a> as |list| but sorted so that according to

0 commit comments

Comments
 (0)