main =
do text <- readFile "data/advent09a.txt"
let grid = mkGrid text
- print $ bounds grid
print $ part1 grid
print $ part2 grid
else S.insert here basin
agenda' = S.union candidates $ S.delete here agenda
-
neighbours :: Grid -> Coord -> [Coord]
neighbours grid here = filter (inRange (bounds grid))
[ here ^+^ delta
| delta <- [V2 -1 0, V2 1 0, V2 0 -1, V2 0 1]
]
-