From 051065f18983959120c459a705499fcfd77f9bd4 Mon Sep 17 00:00:00 2001 From: Christoph Stahl Date: Thu, 2 Dec 2021 17:26:43 +0100 Subject: [PATCH] Day 2: 234 --- d2golf.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2golf.hs b/d2golf.hs index 78ead03..abaaee3 100644 --- a/d2golf.hs +++ b/d2golf.hs @@ -1,3 +1,3 @@ q(h:f:_)(d,n)|"f"d=[h+n,f]|let=[h,f+n] p[h,f,a](d,n)|"f"d=[h,f,a+n]|let=[h+n,f+n*a,a] -main=interact$show.(<$>[p,q]).((product.take 2).).flip(`foldl` [0,0,0]).map(fmap read.splitAt 1.map head.words).lines \ No newline at end of file +main=interact$show.(<$>[p,q]).((product.take 2).).flip(`foldl`[0,0,0]).map(fmap read.splitAt 1.map head.words).lines \ No newline at end of file