From: Neil Smith Date: Mon, 19 Dec 2016 10:56:13 +0000 (+0000) Subject: Added a flip, to make it prettier X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=4ed1e3133856105db52d16c8f6adb60b1ebde920;p=advent-of-code-16.git Added a flip, to make it prettier --- diff --git a/advent19.hs b/advent19.hs index 0fd875f..a544da6 100644 --- 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