distribute-buckets ( alist initial quot -- buckets )


Vocabulary
combinators.private

Inputs
alistan alist
initialan object
quota quotation with stack effect ( obj -- assoc )


Outputs
bucketsa new array


Word description
Sorts the entries of assoc into buckets, using the quotation to yield a set of keys for each entry. The hashcode of each key is computed, and the entry is placed in all corresponding buckets. Each bucket is initially cloned from initial; this should either be an empty vector or a one-element vector containing a pair.

Notes
This word is used in the implementation of hash-case-quot and standard-combination.

Definition