projects
/
advent-of-code-16.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
138b275
)
Added a flip, to make it prettier
author
Neil Smith
<neil.git@njae.me.uk>
Mon, 19 Dec 2016 10:56:13 +0000
(10:56 +0000)
committer
Neil Smith
<neil.git@njae.me.uk>
Mon, 19 Dec 2016 10:56:13 +0000
(10:56 +0000)
advent19.hs
patch
|
blob
|
history
diff --git
a/advent19.hs
b/advent19.hs
index 0fd875f90e456536256a47b9d93c25ab55e1a8fb..a544da6ee9c83ba71aaefa344358dc07b0813055 100644
(file)
--- a/
advent19.hs
+++ b/
advent19.hs
@@
-13,7
+13,7
@@
part1 :: IO ()
part1 = print $ 2 * (input - 2 ^ (toInteger (floor $ logBase 2 (fromIntegral input)))) + 1
part2 :: IO ()
-part2 = print $
index (presentSteps initial) 0
+part2 = print $
flip index 0 $ presentSteps initial
presentSteps :: Seq Int -> Seq Int
presentSteps elves