projects
/
advent-of-code-21.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17e2b39
)
Tidying
author
Neil Smith
<neil.git@njae.me.uk>
Sun, 5 Dec 2021 13:01:13 +0000
(13:01 +0000)
committer
Neil Smith
<neil.git@njae.me.uk>
Sun, 5 Dec 2021 13:01:13 +0000
(13:01 +0000)
advent05/Main.hs
patch
|
blob
|
history
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