From d41fcb354507fd0606a9e583d2a2e9b238061e6b Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Mon, 1 Dec 2025 19:08:13 -0500 Subject: [PATCH] [p1] be more idiomatic --- p1/p1.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/p1/p1.org b/p1/p1.org index 66e74b9..ff0d8df 100644 --- a/p1/p1.org +++ b/p1/p1.org @@ -17,7 +17,9 @@ First load the data as a list of positive or negative numbers Then add the rotations starting from the initial offset and count the number of 0's mod 100; that is what we need for part 1 #+begin_src emacs-lisp - (length (--filter (= 0 it) (--map (mod it 100) (-running-sum (append '(50) data))))) + (length (--filter (= 0 it) + (--map (mod it 100) + (-running-sum (cons 50 data))))) #+end_src #+RESULTS: