Handbook
Glossary
hash@ ( key array -- i )
Vocabulary
hashtables
.
private
Inputs
key
a key
array
the underlying array of a hashtable
Outputs
i
the index to begin hashtable search
Word description
Computes the index to begin searching from the hashcode of the key. Always outputs an even value since keys are stored at even indices of the underlying array.
Definition
USING:
kernel
math
math.private
;
IN:
hashtables.private
:
hash@
( key array -- i )
[
hashcode
>fixnum
dup
fixnum+fast
]
dip
wrap
;
inline