diff options
| author | Andreas Grois <andi@grois.info> | 2025-10-12 18:44:32 +0200 |
|---|---|---|
| committer | Andreas Grois <andi@grois.info> | 2025-10-12 18:44:32 +0200 |
| commit | 6aaa70943202efaa1e6b4ff8b6b8b6b94a564040 (patch) | |
| tree | 171a1a1b459b82f016e756e8649767a2d1311160 /Day3.lean | |
| parent | 2a9261d1ba962deff9fcc1784be44563af513af5 (diff) | |
Lean 4.19
Diffstat (limited to 'Day3.lean')
| -rw-r--r-- | Day3.lean | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -92,7 +92,7 @@ def parse (schematic : String) : Except String Schematic := do def part1 (schematic : Schematic) : Nat := -- fast lookup: We need to know if a part is at a given coordinate open Std(HashSet) in - let partCoordinates := HashSet.insertMany HashSet.empty $ schematic.parts.map Part.position + let partCoordinates := HashSet.insertMany HashSet.emptyWithCapacity $ schematic.parts.map Part.position let partNumbers := schematic.numbers.filter λnumber ↦ number.positions.any λposition ↦ position.adjacents.any partCoordinates.contains |
