From a01803af674f213d3a77b8cb7eeb508ceb85115e Mon Sep 17 00:00:00 2001 From: Christoph Stahl Date: Mon, 6 Dec 2021 17:19:27 +0100 Subject: [PATCH] Day 6: 119 --- d6golf.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/d6golf.hs b/d6golf.hs index b659bb7..33f0c8f 100644 --- a/d6golf.hs +++ b/d6golf.hs @@ -1,3 +1,3 @@ -j=(1<$[0..8])<>zipWith(+)j(drop 2 j) -d n=sum.map(\i->j!!((8-i)+n)) -main=interact$show.((,).d 256<*>d 80).read.('[':).(++"]") +j=(1<$[0..8])++zipWith(+)j(drop 2 j) +d x n=sum[j!!(8-i+n)|i<-x] +main=interact$show.(<$>[256,80]).d.read.('[':).(++"]")