From b5e2da538f4e0038089171ff590404c5fd490d55 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Thu, 10 Dec 2020 08:28:36 +0100 Subject: [PATCH] don't hardcode blurpsequence --- 10/one.icl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/10/one.icl b/10/one.icl index a71ff6d..2241687 100644 --- a/10/one.icl +++ b/10/one.icl @@ -18,4 +18,6 @@ Start w one ls = prod $ map length $ group $ sort [3:[b-a\\a<-ls & b<-tl ls]] -two ls = prod [[0,1,2,4,7,12,20,33,53]!!length l\\l<-group [b-a\\a<-ls & b<-tl ls] | all ((==)1) l] +two ls = prod [blurp !! length l\\l<-group [b-a\\a<-ls & b<-tl ls] | all ((==)1) l] + +blurp =: let seq a b = [a+b-1:seq b (a+b)] in seq 0 1 -- 2.20.1