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:
4506b76
)
Minor tweak
author
Neil Smith
<neil.git@njae.me.uk>
Tue, 10 May 2022 16:49:00 +0000
(17:49 +0100)
committer
Neil Smith
<neil.git@njae.me.uk>
Tue, 10 May 2022 16:49:00 +0000
(17:49 +0100)
advent22/Main.hs
patch
|
blob
|
history
diff --git
a/advent22/Main.hs
b/advent22/Main.hs
index 3712b67459ad794f63427508863e947a1300bd1b..dc67b3f6cfc14e2826f6782ca8c2a620afa81d68 100644
(file)
--- a/
advent22/Main.hs
+++ b/
advent22/Main.hs
@@
-80,7
+80,9
@@
segmentSize cuboids (here, there)
| otherwise = 0
segment :: [Int] -> [(Int, Int)]
-segment evs = if null evs then [] else zip evs $ tail evs
+-- segment evs = if null evs then [] else zip evs $ tail evs
+segment [] = []
+segment evs@(_ : tevs) = zip evs tevs
-- Parse the input file