diff options
author | Rich Hickey <richhickey@gmail.com> | 2008-06-27 00:59:21 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2008-06-27 00:59:21 +0000 |
commit | cda1fcb67d0b9c5b68c460e46876a9ac617e6b94 (patch) | |
tree | b38b9b2e04bbb72fca89ade515fea7123a19e559 /src | |
parent | 0cac41cec6a0e3b33cfc3115b1bdee84aaf0407a (diff) |
fixed reduce w/init
fixed doc on pmin
Diffstat (limited to 'src')
-rw-r--r-- | src/boot.clj | 12 | ||||
-rw-r--r-- | src/parallel.clj | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/boot.clj b/src/boot.clj index 24ff6e73..312d4e9b 100644 --- a/src/boot.clj +++ b/src/boot.clj @@ -453,12 +453,12 @@ (f)))) ([f val coll] (let [s (seq coll)] - (when (instance? clojure.lang.IReduce s) - (. #^clojure.lang.IReduce s (reduce f val))) - ((fn [f val s] - (if s - (recur f (f val (first s)) (rest s)) - val)) f val s)))) + (if (instance? clojure.lang.IReduce s) + (. #^clojure.lang.IReduce s (reduce f val)) + ((fn [f val s] + (if s + (recur f (f val (first s)) (rest s)) + val)) f val s))))) (defn reverse "Returns a seq of the items in coll in reverse order. Not lazy." diff --git a/src/parallel.clj b/src/parallel.clj index bc9d5a9a..58fed289 100644 --- a/src/parallel.clj +++ b/src/parallel.clj @@ -145,7 +145,7 @@ pvec. ([coll comp] (. (par coll) max comp))) (defn pmin - "Returns the maximum element, presuming Comparable elements, unless + "Returns the minimum element, presuming Comparable elements, unless a Comparator comp is supplied" ([coll] (. (par coll) min)) ([coll comp] (. (par coll) min comp))) |