Added link to blog
[advent-of-code-23.git] / advent11 / Main.hs
index 283060d7c8a7bf470588aa87d9dc9a3580099805..cfdbe0ea871162939205b963a3eb5f9c018ea9d2 100644 (file)
@@ -1,4 +1,4 @@
--- Writeup at https://work.njae.me.uk/2023/12/10/advent-of-code-2023-day-10/
+-- Writeup at https://work.njae.me.uk/2023/12/11/advent-of-code-2023-day-11/
 
 import AoC
 
@@ -29,7 +29,8 @@ part2 galaxies = allDistances $ expandGalaxies galaxies (10^6)
 allDistances :: Galaxies -> Int
 allDistances gs = case S.minView gs of
   Nothing -> 0
-  Just (g, gs') -> (S.foldl' (addDist g) 0 gs) + allDistances gs'
+  Just (g, gs') -> (S.foldl' (
+    addDist g) 0 gs) + allDistances gs'
   where addDist g1 acc g2 = acc + distance g1 g2
 
 distance :: Position -> Position -> Int