From 4584437d432a0fdd787f376273d948ca3f9fcea0 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Wed, 27 Sep 2023 09:56:00 -0600 Subject: [PATCH] these lambdas are unnecessary --- src/vector/norm.lisp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/vector/norm.lisp b/src/vector/norm.lisp index 2158296..aa51bce 100644 --- a/src/vector/norm.lisp +++ b/src/vector/norm.lisp @@ -3,8 +3,7 @@ (defun p-norm (p) (lambda (v) (expt - (reduce (lambda (acc x) - (+ acc x)) + (reduce #'+ (mapcar (lambda (x) (abs (expt x p))) @@ -12,6 +11,4 @@ (/ 1 p)))) (defun max-norm (v) - (reduce (lambda (acc x) - (max acc x)) - v)) + (reduce #'max v))