projects
/
advent-of-code-21.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Tidying
[advent-of-code-21.git]
/
advent05
/
Main.hs
diff --git
a/advent05/Main.hs
b/advent05/Main.hs
index 5669a537055a566cf8b18e27ed50d88dce6ffb85..0edc490d7d4ca58a97615976a6420c55597b5524 100644
(file)
--- a/
advent05/Main.hs
+++ b/
advent05/Main.hs
@@
-56,7
+56,6
@@
findDelta (Line (V2 x0 y0) (V2 x1 y1)) = (V2 dx dy)
dy = signum (y1 - y0)
addLines :: Grid -> [[Point]] -> Grid
--- addLines diagram expandedLines = foldr insertLine diagram expandedLines
addLines = foldr insertLine
where insertPoint p d = M.insertWith (+) p 1 d
insertLine l d = foldr insertPoint d l