summaryrefslogtreecommitdiffstats
path: root/src/03.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/03.lisp')
-rw-r--r--src/03.lisp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/03.lisp b/src/03.lisp
index a9cd314..2a4b2fa 100644
--- a/src/03.lisp
+++ b/src/03.lisp
@@ -10,11 +10,6 @@
(defun 03/parse-input (input-file)
(03/parse-input-direct (get-file-lines input-file)))
-;; Loops through two item windows on input and counts each time the first is less than the second
-(defun 03/partial (func &rest args1)
- (lambda (&rest args2)
- (apply func (append args1 args2))))
-
(defun 03/is-more (h l)
(mapcar (lambda (x) (if (< x h) 0 1)) l))
@@ -29,11 +24,11 @@
(defun 03/find-most-common (parsed-input)
(let ((half-length (/ (list-length parsed-input) 2)))
- (03/is-more half-length (apply (03/partial #'mapcar #'+) parsed-input))))
+ (03/is-more half-length (apply (partial #'mapcar #'+) parsed-input))))
(defun 03/find-least-common (parsed-input)
(let ((half-length (/ (list-length parsed-input) 2)))
- (03/is-less half-length (apply (03/partial #'mapcar #'+) parsed-input))))
+ (03/is-less half-length (apply (partial #'mapcar #'+) parsed-input))))
(defun 03/part-a (parsed-input)
(let* ((l (03/find-most-common parsed-input))