reducers example isn't parallel
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 55/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- clojure
- Domain
- documentation
Research direction
Start at the reducers reference page linked in the issue and find the foldcat example using (range 100000). Update the example so it uses a vector for parallel folding and retain a concise explanatory comment; done means the page no longer presents a sequential range as a parallel example.
Written by the indexing model from the issue text.
Description
The following example included in https://clojure.org/reference/reducers won't run in parallel because range is a seq:
(r/foldcat (r/filter even? (r/map inc (range 100000))))
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 (range 100000)))))
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).
- Dominant language
- HTML
- Stars
- 259
- Forks
- 275
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from clojure/clojure-site
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
clojure/clojure-site#723 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
clojure/clojure-site#538 · 3 comments ·
-
help wanted
Difficulty 1/5 Under an hour Newbie friendliness 62/100
clojure/clojure-site#386 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
clojure/clojure-site#715 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
clojure/clojure-site#713 ·
All issues in clojure/clojure-site
Similar issues
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
feature pydanty:is-working
Difficulty 1/5 Under an hour Newbie friendliness 88/100
pydantic/pydantic-ai#8647 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
:watch: Not Triaged dotnet-fsharp/svc
Difficulty 1/5 Under an hour Newbie friendliness 90/100