Returns the underluing data of this MutableBag as an (immutable) DataBag.
Creates a copy of this MutableBag.
Creates a copy of this MutableBag. Can be used for by-value assignment.
Performs an update operation with the following semantics.
Performs an update operation with the following semantics.
For each m in ms, the implementation will call
- f(m.key, Some(v), m.value) if (m.key, v) is in the underlying mutable bag;
- f(m.key, None, m.value) if (m.key, v) is not in the underlying mutable bag;
Each f call can optionally return an v value to be associated with the current k.
The collection of updated values is merged in the underlying mutable bag and returned as final result.
The functional semantics of the function rely on the assumption that K is a
unique key in ms. Otherwise, the implied state update is non-deterministic.
A mutable bag abstraction.