Looks like a bug in reductions? The lazy-seq macro expects something
the implements ISeq, but the result of (+) is 0. Not sure if this is
the right fix, but it works.
(defn reductions
"Returns a lazy seq of the intermediate values of the reduction (as
per reduce) of coll by f, starting with
Hi,
this is already filed:
http://www.assembla.com/spaces/clojure/tickets/362-incorrect-result-of-reductions-for-empty-input-sequences
Sincerely
Meikel
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@goog
Hi!
Here it is:
(reduce + '()) gives 0
(reductions + '()) gives java.lang.IllegalArgumentException: Don't
know how to create ISeq from: java.lang.Integer
So reductions not always returns a sequence of intermediate values of
the reduction.
Thanks!
--
You received this message because you are