@std/equality.ms#
These names are available in the prelude; no import required.
Explicit imports of these prelude declarations are rejected; remove them from the import.
Equal Interface#
Equality and hashing are ordinary operation interfaces. Built-in data retains its value semantics; an explicit implementation selects domain identity.
Manuscript
interface Equal:
fn equals(other: Equal) -> BoolEqual.equals#
Compares this value with another value in the same domain.
Manuscript
fn equals(other: Equal) -> BoolHashable Interface#
A type with a stable hash consistent with its Equal implementation.
Manuscript
interface Hashable:
fn hash() -> IntHashable.hash#
Returns a stable hash consistent with equals for the same value.
Manuscript
fn hash() -> Int