A more efficient version of add
A more efficient version of add
Check if a bag contains an element
Check if a bag contains an element
Deletes an element and returns the new bag It doesn't complain if the element doesn't exist
Deletes an element and returns the new bag It doesn't complain if the element doesn't exist
Elements of a Bag with their multiplicity
Elements of a Bag with their multiplicity
Inserts an element in a bag and returns the new bag
Inserts an element in a bag and returns the new bag
Multiplicity of an element in a bag
Multiplicity of an element in a bag
Size returns the total number of elements.
Size returns the total number of elements. Notice that if an element appears 4 times, it adds 4 to the counter
Union of two bags
Union of two bags