X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=advent09%2FMain.hs;h=df5b1be8e413054286c52e43ce7928209f59d0d7;hb=e2b15781f674220586e860fb9a85b6ad0f278fad;hp=a5c4cccfdda6f435021a2d0555d71471730eb813;hpb=9e104a7ffbd3b6e57b98b9103a4b532802e47d52;p=advent-of-code-21.git diff --git a/advent09/Main.hs b/advent09/Main.hs index a5c4ccc..df5b1be 100644 --- a/advent09/Main.hs +++ b/advent09/Main.hs @@ -15,7 +15,6 @@ main :: IO () main = do text <- readFile "data/advent09a.txt" let grid = mkGrid text - print $ bounds grid print $ part1 grid print $ part2 grid @@ -64,10 +63,8 @@ breadthFirstSearch grid agenda basin 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] ] -