Day 10: More Golf
This commit is contained in:
parent
44a48767ef
commit
edc4c375ef
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user