Skip to content

Examples for Iterator.prototype.sliding #22

@slowcheetah

Description

@slowcheetah

Can you show an example of the result that should be obtained, based on the specification from this pull request?
For example, what would be the result for the following lines:

const digits = () => [1, 2, 3, 4].values();
const slidingOf2 = Array.from(digits.sliding(2));

I'm concerned that, according to the specification (if I understand it correctly), in the example above we will now get an extra element:

[[1, 2], [2, 3], [3, 4], [4]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions