From edc4c375ef22d0dcc1ae165a65cdaad224a9ab87 Mon Sep 17 00:00:00 2001 From: shu Date: Thu, 10 Dec 2020 08:22:40 +0100 Subject: [PATCH] Day 10: More Golf --- 2020/day10/day10.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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