DEPRECATED. Prefer clojure.core version.
Returns a lazy seq of the intermediate values of the reduction (as
per reduce) of coll by f, starting with init.
(defn reductions
"DEPRECATED. Prefer clojure.core version.
Returns a lazy seq of the intermediate values of the reduction (as
per reduce) of coll by f, starting with init."
{:deprecated "1.2"}
([f coll]
(if (seq coll)
(rec-seq self (cons (first coll) (map f self (rest coll))))
(cons (f) nil)))
([f init coll]
(rec-seq self (cons init (map f self coll)))))
Comments top
No comments for reductions. Log in to add a comment.