projects
/
advent-of-code-18.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92b8d2e
)
Tidying
author
Neil Smith
<neil.git@njae.me.uk>
Sun, 16 Dec 2018 16:16:14 +0000
(16:16 +0000)
committer
Neil Smith
<neil.git@njae.me.uk>
Sun, 16 Dec 2018 16:16:14 +0000
(16:16 +0000)
src/advent14/advent14.hs
patch
|
blob
|
history
diff --git
a/src/advent14/advent14.hs
b/src/advent14/advent14.hs
index 9a219e119aa0d862c2c82b4fe5b69ab714b07b77..6df870182f54c5ba3e4d6ddb16c7ec55dd9bfdbc 100644
(file)
--- a/
src/advent14/advent14.hs
+++ b/
src/advent14/advent14.hs
@@
-26,8
+26,6
@@
part2 :: State -> Int
part2 state0 = if (takeR (Q.length targetSeq) recipes) == targetSeq
then (Q.length recipes) - (Q.length targetSeq)
else (Q.length recipes) - (Q.length targetSeq) - 1
--- recipes -- (Q.length recipes) - (Q.length targetSeq)
-
where (State _ _ recipes) = head $ dropWhile (unfinished2 targetSeq) $ states state0
unfinished2 :: Recipes -> State -> Bool