diff options
| author | Andreas Grois <andi@grois.info> | 2025-11-16 14:24:46 +0100 |
|---|---|---|
| committer | Andreas Grois <andi@grois.info> | 2025-11-16 14:24:46 +0100 |
| commit | 6d10b7594f487bdfbef99d05bda34405dd85c8b8 (patch) | |
| tree | 42c630d3612322af6cabcd3ac197912507872e45 /Day14.lean | |
| parent | 4fbeb023e0b2c58895e8df8d169035e274159537 (diff) | |
Lean 4.23
Diffstat (limited to 'Day14.lean')
| -rw-r--r-- | Day14.lean | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -211,11 +211,11 @@ private def compareControlPanels (a b : ControlPanel) : Bool := /-- (Bad) Hash-Function for ControlPanel. It's good enough for this riddle, but that's about it. -/ private def hashControlPanel (p : ControlPanel) : UInt64 := Id.run do - let mut hash : UInt64 := mixHash ⟨Fin.ofNat' UInt64.size p.width⟩ ⟨Fin.ofNat' UInt64.size p.height⟩ + let mut hash : UInt64 := mixHash ⟨Fin.ofNat UInt64.size p.width⟩ ⟨Fin.ofNat UInt64.size p.height⟩ for hi : index in [:p.elements.size] do match p.elements[index] with - | Tile.Round => hash := mixHash hash ⟨Fin.ofNat' UInt64.size index⟩ - | Tile.Cube => hash := mixHash hash ⟨Fin.ofNat' UInt64.size (index + p.elements.size)⟩ + | Tile.Round => hash := mixHash hash ⟨Fin.ofNat UInt64.size index⟩ + | Tile.Cube => hash := mixHash hash ⟨Fin.ofNat UInt64.size (index + p.elements.size)⟩ | Tile.Space => continue hash |
