Record HashStatepub

Source
:record(pub) HashState
  .seed (Int ..)
Description

Opaque, seeded hasher state used internally by HashMap and HashSet for HashDoS resistance. The canonical constructor (HashState .new) draws entropy via +Random. The free fn hash-state-new is retained as a zero-seed helper for tests that need a deterministic HashState without carrying an effect.

Deferred (lands with the HashMap/HashSet .default rewire):

  • Threading +Random through (HashMap .default) / (HashSet .default). That is a prelude-semver change (both types drop out of the prelude) and cascades through every construction site, so it is gated behind effect-handler infra.

Fields

.seed Int(..)

Implementations

impl HashState

Construct a HashState seeded from a fresh +Random draw. This is the spec-canonical form of (HashState .new); callers that need a deterministic zero-seeded state (e.g. bootstrap tests) use hash-state-new instead.

.new ( HashState )