Skip to content

A Method for Removing All Elements in One Array that Exist in Another #166

Open
@michaeleisel

Description

@michaeleisel

This is a "subtract" operation, e.g.:

let animals = ["Cow", "Bulldog", "Labrador"]
return animals.without(["Bulldog", "Labrador"]) // ["Cow"]

We can see that this is an operation Swift developers are already trying to do from SO questions (1, 2), and it exists in other languages like Ruby.

This is a proposal to get consensus on it. And if people like it, I'd be happy to implement it.

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