Generic mapN and zipN
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 30/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
调研方向
Read the issue’s proposed map2–map10 and zip2–zip10 signatures, then inspect the existing zip implementation and the project’s typeclass conventions. Decide which abstraction can support the proposed generic operations and how Tuple and Tuple2 should differ; done means the API design and its supported types are agreed before implementation.
由索引模型根据 Issue 内容生成。
描述
Proposing we add these mapN functions, and make them available to more than just List.
map2 :: forall a b c f. Functor f => (a -> b -> c) -> f a -> f b -> f c
map3 :: forall a b c d f. Functor f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
...
map10 ...
We can then use the mapN functions to create zipN functions:
-- This already exists, but it would be nice to offer a more generic version:
zip :: forall a b f. Functor f => f a -> f b -> Tuple a b
zip = map2 Tuple
-- Likely needed to fill the gap between the seemingly-identical
-- (but actually different) `Tuple` and nested `Tuple2`.
zip2 :: forall a b f. Functor f => f a -> f b -> f (Tuple2 a b)
zip2 = map2 Tuple2
zip3 :: forall a b c f. Functor f => f a -> f b -> f c -> f (Tuple3 a b c)
zip3 = map3 Tuple3
...
zip10 :: ...
zip10 = map10 Tuple10
We probably need a different typeclass than Functor though. What about Zippable?
A motivation for adding these functions is to get closer to Elm's usability in this area:
https://package.elm-lang.org/packages/elm/core/latest/List#map2
- 主要语言
- PureScript
- 星标
- 61
- 派生
- 50
- 平均合并
- 2 天 6 小时
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
purescript/purescript-lists 的其他 Issue
-
ZipList is Bind未关闭
难度 4/5 3-5 天 新手友好度 35/100
purescript/purescript-lists#219 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 48/100
purescript/purescript-lists#218 ·
-
Data.List.NonEmpty.intersect and Data.List.NonEmpty.intersectBy throw when intersection empty可能已有人在做 @evaogbe 于 1066 天前认领。 未关闭good first issue type: bug
难度 4/5 3-5 天 新手友好度 1/100
purescript/purescript-lists#216 · 2 条评论 ·
-
type: enhancement
难度 4/5 3-5 天 新手友好度 25/100
purescript/purescript-lists#197 · 1 条评论 ·
-
type: enhancement
难度 5/5 一周以上 新手友好度 24/100
purescript/purescript-lists#194 · 5 条评论 ·
查看 purescript/purescript-lists 的全部 Issue
相似的 Issue
-
ManageSieve proxy: a backend's NO/BYE greeting is skipped as a capability line and reported as EOF未关闭bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Mend: dependency security vulnerability
难度 2/5 1-3 小时 新手友好度 62/100
ManageIQ/manageiq-pods#1476 ·
维护者通常 1 天内回复
-
mcp: typed tool handlers lose wrapped JSON-RPC errors可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
modelcontextprotocol/go-sdk#1529 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
FinanceFlash/unvibecode#818 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100