assoc-hashcode ( n assoc -- code )
Factor handbook » The language » Collections » Associative mapping operations » Associative mapping protocol

Prev:assoc= ( assoc1 assoc2 -- ? )
Next:assoc-clone-like ( assoc exemplar -- newassoc )


Vocabulary
assocs

Inputs
na non-negative integer
assocan assoc


Outputs
codean integer


Word description
Computes a hashcode for an assoc, such that equal assocs will have the same hashcode.

Notes
Custom assoc implementations should use this word to implement a method for the hashcode* generic word.

Definition