collections HashFunction64 - tadashi9e/gmp4pony GitHub Wiki
A pluggable hash function with 64-bit hashes.
interface val HashFunction64[A: A]Data structures create instances internally. Use a primitive if possible.
new val create()
: HashFunction64[A] val^- HashFunction64[A] val^
Calculate the hash of some type. This is an alias of the type parameter to allow data structures to hash things without consuming them.
fun box hash64(
x: box->A!)
: U64 val- x: box->A!
- U64 val
Determine equality between two keys with the same hash. This is done with viewpoint adapted aliases to allow data structures to determine equality in a box fun without consuming keys.
fun box eq(
x: box->A!,
y: box->A!)
: Bool val- x: box->A!
- y: box->A!
- Bool val