assoc-hashcode ( n assoc -- code ) (original) (raw)

Vocabulary
assocs

Inputs

n a non-negative integer
assoc an assoc

Outputs

code an 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

USING: kernel ;

IN: assocs

: assoc-hashcode ( n assoc -- code ) >alist hashcode* ;