From c970abf345735ab03f1e93b8eaadfe4afb5c37a1 Mon Sep 17 00:00:00 2001 From: Gattix Date: Sat, 9 Dec 2023 17:42:03 +0100 Subject: [PATCH] day09: remove f the wisdom of Karl has spoken --- 2023/day09/day09.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/2023/day09/day09.hs b/2023/day09/day09.hs index 23d7960..245eb4b 100644 --- a/2023/day09/day09.hs +++ b/2023/day09/day09.hs @@ -13,7 +13,5 @@ day09 = (sum *** sum) . unzip . map - ((f (+) last &&& f (-) head) . + ((sum . map last &&& foldr1 (-) . map head) . takeWhile (not . null) . iterate (zipWith (-) =<< tail)) - where - f f1 f2 = foldr1 f1 . map f2