Subtractable
This trait represents collection-like objects that can be reduced using a '+' operator.
This trait represents collection-like objects that can be reduced
using a '+' operator. It defines variants of -
and --
as convenience methods in terms of single-element removal -
.
- Type Params
- A
the type of the elements of the collection.
- Repr
the type of the collection itself
- Deprecated
Value members
Abstract methods
Concrete methods
Creates a new collection from this collection with some elements removed.
Creates a new collection from this collection with some elements removed.
This method takes two or more elements to be removed. Another overloaded variant of this method handles the case where a single element is removed.
- Value Params
- elem1
the first element to remove.
- elem2
the second element to remove.
- elems
the remaining elements to remove.
- Returns
a new collection that contains all elements of the current collection except one less occurrence of each of the given elements.
Creates a new collection from this collection by removing all elements of another collection.
Creates a new collection from this collection by removing all elements of another collection.
- Value Params
- xs
the collection containing the removed elements.
- Returns
a new collection that contains all elements of the current collection except one less occurrence of each of the elements of
elems
.