about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDarren Bane <darren.bane@emdalo.com>2021-02-25 13:03:47 +0000
committerDarren Bane <darren.bane@emdalo.com>2021-02-25 13:03:47 +0000
commitb319af5ae04f825eb756c7c4aa2c4c122cf93c12 (patch)
treefe4bb173c4ce199c084e95bd8336a58fa8946af4
parent123757e1122ff19925671325f95e94b145d91e31 (diff)
downloadlsp-b319af5ae04f825eb756c7c4aa2c4c122cf93c12.tar.gz
Forgot a function
-rw-r--r--dbc2.lsp2
1 files changed, 1 insertions, 1 deletions
diff --git a/dbc2.lsp b/dbc2.lsp
index 657d297..6915c4a 100644
--- a/dbc2.lsp
+++ b/dbc2.lsp
@@ -12,7 +12,7 @@
   (the <list> values)
   ;; requires non-null list
   (assert (> (length values) 0))
-  (let ((res (quotient (sum values) (length values))))
+  (let ((res (quotient (sum (mapcar #'abs values)) (length values))))
        ;; must ensure positive result
        (assert (>= res 0))
        (the <fixnum> res)))