From 1a9a998460dad050754eeb6046545a0ddf07a6cf Mon Sep 17 00:00:00 2001 From: Sijmen Schoon Date: Thu, 9 Dec 2021 14:00:15 +0100 Subject: [PATCH] day07: reformat a little --- day07.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/day07.scm b/day07.scm index 76f3e98..b4199de 100644 --- a/day07.scm +++ b/day07.scm @@ -9,10 +9,8 @@ ; PART 1 (let* ((sorted (sort numbers <)) (median (list-ref sorted (floor/ (length numbers) 2))) - (part1 - (foldl (lambda (x y) (+ x (abs (- y median)))) - 0 - numbers))) + (part1 (foldl (lambda (x y) (+ x (abs (- y median)))) + 0 numbers))) (format #t "part 1: ~A~%" part1)) ; PART 2 @@ -20,8 +18,7 @@ (define (part2- avg) (foldl (lambda (x y) (+ x (triangular (abs (- y avg))))) - 0 - numbers)) + 0 numbers)) (let* ((len (length numbers)) (sum (foldl + 0 numbers))