these lambdas are unnecessary

This commit is contained in:
Elizabeth Hunt 2023-09-27 09:56:00 -06:00
parent 1a8c81d07e
commit 4584437d43
Signed by: simponic
GPG Key ID: 52B3774857EB24B1

View File

@ -3,8 +3,7 @@
(defun p-norm (p) (defun p-norm (p)
(lambda (v) (lambda (v)
(expt (expt
(reduce (lambda (acc x) (reduce #'+
(+ acc x))
(mapcar (lambda (x) (mapcar (lambda (x)
(abs (abs
(expt x p))) (expt x p)))
@ -12,6 +11,4 @@
(/ 1 p)))) (/ 1 p))))
(defun max-norm (v) (defun max-norm (v)
(reduce (lambda (acc x) (reduce #'max v))
(max acc x))
v))