Esc

hash

procedureextensionsince 0.36.1Source
  • macOS: hash works on macOS
  • Linux: hash works on Linux
  • Windows: hash works on Windows
  • Wasm: hash works on Wasm

Hashes semantic fields, never padding or rule pointers; equal values have equal hashes.

Signature

hash :: (
    value: $T/ .[Date, Time_Of_Day, Date_Time, Timestamp, Signed_Duration, Offset, Time_Zone, Zoned]
) -> u32
Example↗
a := Date.{ 2024, 1, 1 };
b := Date.{ 2024, 1, 1 };
assert(hash(a) == hash(b));

See also