projects
/
advent-of-code-16.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added a flip, to make it prettier
[advent-of-code-16.git]
/
advent19.hs
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 ()
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
presentSteps :: Seq Int -> Seq Int
presentSteps elves