reducers example isn't parallel
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 55/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- clojure
调研方向
从 issue 中链接的 reducers 参考页面开始,找到使用 (range 100000) 的 foldcat 示例。更新该示例,使其使用 vector 进行并行 folding,并保留简洁的说明性注释;当页面不再将顺序 range 作为并行示例呈现时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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).
- 主要语言
- HTML
- 星标
- 259
- 派生
- 275
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
clojure/clojure-site 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
clojure/clojure-site#723 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
clojure/clojure-site#538 · 3 条评论 ·
-
help wanted
难度 1/5 1 小时以内 新手友好度 62/100
clojure/clojure-site#386 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 55/100
clojure/clojure-site#715 ·
-
难度 5/5 一周以上 新手友好度 25/100
clojure/clojure-site#713 ·
查看 clojure/clojure-site 的全部 Issue
相似的 Issue
-
agent-ready documentation needs-triage
难度 1/5 1-3 小时 新手友好度 88/100
-
untriaged
难度 1/5 1 小时以内 新手友好度 88/100
dotnet/dotnet-api-docs#13095 ·
-
documentation
难度 1/5 1 小时以内 新手友好度 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
refactor
难度 2/5 1-3 小时 新手友好度 78/100