Re: [heycam/webidl] More convenient way to refer to / use "map iterators" (#324)

Reviving, because @annevk reminded me about the `Headers` constructor which is still hand-rolling taking a map-sequence, which is super non-obvious when you read it.

As an argument type: `map-sequence<Foo, Bar>` does the same processing as `sequence<>`, but ensures that (a) each item in the sequence is a two-element `sequence<>` as well, and (b) the first item in the subsequence is of type Foo, the second is of type Bar.  Your algorithm receives it as an Infra list of lists.

As a return type: the returned value must be an Infra list, containing only two-element Infra lists where the first item is of type Foo and the second is of type Bar; it transforms into a JS Array of Arrays.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/324#issuecomment-361842056

Received on Wednesday, 31 January 2018 07:00:47 UTC