Skip to content

Add ZipWith #2

@micheleriva

Description

@micheleriva

zipWith works similar to zip, but applies a function to all the elements in the lists.
Its signature is (a -> b -> c) -> [a] -> [b] -> [c] and should be used the following way:

When inherited:

[1, 2, 3].zipWith((x) => x * 2, [4, 5, 6]) // => [4, 10, 18]

When used as a standalone function:

zipWith((x) => x * 2, [1, 2, 3], [4, 5, 6]) // => [4, 10, 18]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions