diff --git a/lib/lib-advent.org b/lib/lib-advent.org index 14bffc0..6b56dc4 100644 --- a/lib/lib-advent.org +++ b/lib/lib-advent.org @@ -46,7 +46,7 @@ #+begin_src emacs-lisp :results none (defun advent/dot (a b) "Return the dot product of the two vectors" - (-reduce #'+ (-map (lambda (x) (* (car x) (cdr x))) (-zip-pair a b)))) + (-sum (-map (lambda (x) (* (car x) (cdr x))) (-zip-pair a b)))) (defun advent/neighbour (p dir) "Returns the neighbour to P in the direction DIR"