* Negate all multiplicities in the collection.
()
| 50 | * Negate all multiplicities in the collection. |
| 51 | */ |
| 52 | negate(): MultiSet<T> { |
| 53 | return new MultiSet( |
| 54 | this.#inner.map(([data, multiplicity]) => [data, -multiplicity]), |
| 55 | ) |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * Concatenate two collections together. |