You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is confusing to find a "no-gain" example in a page explaining reducers.
Consequently, I'd suggest instead:
;; `vec` is there since seqs don't support parallel folding
(r/foldcat (r/filter even? (r/map inc (vec (range100000)))))
Perhaps the comment would duplicate some information already in the page (If a collection does not support folding, it will fall back to non-parallel reduce instead.), but newcomers probably will appreciate a reminder (and an example).
The text was updated successfully, but these errors were encountered:
The following example included in https://clojure.org/reference/reducers won't run in parallel because
range
is a seq:It is confusing to find a "no-gain" example in a page explaining reducers.
Consequently, I'd suggest instead:
Perhaps the comment would duplicate some information already in the page (
If a collection does not support folding, it will fall back to non-parallel reduce instead.
), but newcomers probably will appreciate a reminder (and an example).The text was updated successfully, but these errors were encountered: