Module Core_kernel__Bag_intf
Imperative set-like data structure.
There are a few differences from simple sets:
- Duplicates are allowed.
- It doesn't require anything (hashable, comparable) of elements in the bag.
- Addition and removal are constant time operations.
It is an error to modify a bag (add
, remove
, remove_one
, ...) during iteration (fold
, iter
, ...).
module type S = sig ... end
module type Bag = sig ... end