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)
(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))