diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-09-27 09:56:00 -0600 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-09-27 09:56:00 -0600 |
commit | 4584437d432a0fdd787f376273d948ca3f9fcea0 (patch) | |
tree | fb7996d030562cc4c47763899bd92c5bfc9575ab | |
parent | 1a8c81d07efe55c5a6909aff32359d4b8866af1c (diff) | |
download | cmath-4584437d432a0fdd787f376273d948ca3f9fcea0.tar.gz cmath-4584437d432a0fdd787f376273d948ca3f9fcea0.zip |
these lambdas are unnecessary
-rw-r--r-- | src/vector/norm.lisp | 7 |
1 files 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)) |