flix

0.79.0

Hash

Trait for types that can be hashed, and its functions.

trait Hash[a: Type]Source

Trait for types that can be hashed.

Instances

Primitives
Unit, Bool, Char, Float32, Float64, BigDecimal, Int8, Int16, Int32, Int64, BigInt, String, Vector[a] and tuples of 2 to 10 elements
Non-primitives
Duration, Identity[a], List[a], Map[k, v], MultiMap[k, v], Nec[a], Nel[a], Option[a], Result[e, t], Set[a], Size, Validation[e, t]

Signatures

def hash(x: a): Int32 with Hash[a]§ Source

Returns a hash value for the given x.

Module Definitions

def combine(h1: Int32, h2: Int32): Int32§ Source

Combines the two given hash values.

def magic(): Int32§ Source

Returns a number used for combining hash values.