From cd94c350e69a931f4dfc84ecfe34a333a91b3552 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 29 Oct 2024 20:00:39 +0000 Subject: Use every instead of all --- 2022/puzzle-8.lisp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '2022/puzzle-8.lisp') diff --git a/2022/puzzle-8.lisp b/2022/puzzle-8.lisp index 85fd1ae..54aca27 100644 --- a/2022/puzzle-8.lisp +++ b/2022/puzzle-8.lisp @@ -23,7 +23,7 @@ (defun is-visible? (x y) (if (or (= x 0) (= x (- n-trees 1)) - (= y 0) (= y (- n-trees 1))) + (= y 0) (= y (- n-trees 1))) t (let* ((tree (get-tree x y)) (lt-tree? (lambda (a) (< a tree))) @@ -34,8 +34,8 @@ (col-top (subseq col 0 y)) (col-bottom (subseq col (+ y 1)))) (some #'id - (mapcar (lambda (x) (all lt-tree? x)) - (list row-left row-right col-top col-bottom)))))) + (mapcar (lambda (x) (every lt-tree? x)) + (list row-left row-right col-top col-bottom)))))) (defun how-many-visible () (loop -- cgit v1.2.3-13-gbd6f