Collection of objects represented as hash keys
QuantHash represents a set of objects, represented as the keys of a
Hash. When asked to behave as a list it ignores its
.values and returns only
.keys (possibly replicated by weight in the case of bag types). For any
.total methods returns the current sum of the values.
All standard QuantHash containers have a default value that is false (such as
Bool::False), and keep around only those entries with non-default values, automatically deleting any entry if its value goes to that (false) default value.
QuantHash does role Associative, which provides the following routines:
Should return the value / container at the given key.
Should return a
Bool indicating whether the given key actually has a value.
method STORE(\values, :)
This method should only be supplied if you want to support the:
my is Foo = a => 42, b => 666;
syntax for binding your implementation of the
Should accept the values to (re-)initialize the object with, which either could consist of
Pairs, or separate key/value pairs. The optional named parameter will contain a
True value when the method is called on the object for the first time. Should return the invocant.