<< Prev | - Up - | Next >> |
Bags are finite multisets of values, i.e sets in which elements may occur multiply. Stated otherwise, a bag is a function from values to numbers, which maps each value to the number of its occurences in the bag. The type of a bag object is:
unit(put :value->
toList:->list
member:value->bool)
<< Prev | - Up - | Next >> |