about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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)))