Re: [whatwg/webidl] WIP: switching maplike/setlike to use infra maps and sets (PR #1138)

@tabatkins commented on this pull request.



>  
+<div algorithm>
+    To <dfn>create a map iterator</dfn>
+    from a [=/map=] |map|
+    and a |kind| which is either "<code>key+value</code>", "<code>key</code>", or "<code>value</code>"):
+
+    1. Let |closure| be a new [=/Abstract Closure=] with no parameters
+        that captures |map| and |kind| and performs the following steps when called:
+        1. [=map/For each=] |key| → |value| of |map|:
+            1. Set |key| and |value| to each [=converted to an ECMAScript value=].
+            1. If |kind| is "<code>key</code>", let |result| be |key|.
+            1. Else if |kind| is "<code>value</code>", let |result| be |value|.
+            1. Else, let |result| be [$CreateArrayFromList$](« |key|, |value| »).
+            1. Perform [=?=] [$GeneratorYield$]([$CreateIterResultObject$](|result|, <emu-value>false</emu-value>)).

wtf, i also had two `</emu>`

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1138#discussion_r865295619

You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/pull/1138/review/962508773@github.com>

Received on Wednesday, 4 May 2022 20:05:04 UTC