diff --git a/2020/day10/day10.hs b/2020/day10/day10.hs index 4bae31d..f78f2cd 100644 --- a/2020/day10/day10.hs +++ b/2020/day10/day10.hs @@ -1,4 +1,3 @@ -import Control.Arrow import Control.Monad import Data.List @@ -16,6 +15,5 @@ arrangements n = jolts :: [Int] -> [Int] jolts = - map (uncurry subtract) . - ap zip tail . - uncurry (++) . (id &&& (flip (:) [] . (+ 3) . last)) . (:) 0 . sort + ap (zipWith subtract) tail . + ap (++) (flip (:) [] . (+ 3) . last) . (:) 0 . sort