aboutsummaryrefslogtreecommitdiff
path: root/src/clojure/contrib
diff options
context:
space:
mode:
authorKonrad Hinsen <konrad.hinsen@laposte.net>2009-02-15 21:30:38 +0000
committerKonrad Hinsen <konrad.hinsen@laposte.net>2009-02-15 21:30:38 +0000
commiteb1979100191ae02cd11c29b162545d6ff696e67 (patch)
treedd41d6bf4234cee5709f10df6ec821564dbf7664 /src/clojure/contrib
parent9d326f54a65e582c0076406cff6204af036fd25d (diff)
accumulators: fixes to make it work with the lazy branch
Diffstat (limited to 'src/clojure/contrib')
-rw-r--r--src/clojure/contrib/accumulators.clj6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/clojure/contrib/accumulators.clj b/src/clojure/contrib/accumulators.clj
index 65821976..5a6ec415 100644
--- a/src/clojure/contrib/accumulators.clj
+++ b/src/clojure/contrib/accumulators.clj
@@ -1,7 +1,7 @@
;; Accumulators
;; by Konrad Hinsen
-;; last updated February 13, 2009
+;; last updated February 15, 2009
;; This module defines various accumulators (list, vector, map,
;; sum, product, counter, and combinations thereof) with a common
@@ -167,13 +167,13 @@
; similarly used to represent +infinity.
(defacc maximum (fn [& xs]
- (when-let [xs (filter identity xs)]
+ (when-let [xs (seq (filter identity xs))]
(apply max xs)))
nil
"An empty maximum accumulator. Only numbers can be added.")
(defacc minimum (fn [& xs]
- (when-let [xs (filter identity xs)]
+ (when-let [xs (seq (filter identity xs))]
(apply min xs)))
nil
"An empty minimum accumulator. Only numbers can be added.")