foldr1 and foldl1 are too restrictive
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 36/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- backend
Hướng nghiên cứu
Start by comparing the proposed and current foldr1 signatures in the issue, then trace their definitions and the corresponding foldl1 implementation in the repository. Check existing tests for these functions and determine whether the proposed terminal-value mapping behavior can be supported without a full traversal; done means the API decision and its behavior are covered by tests. The issue has had no comment activity for over four years.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Should the signature of foldr1 (and similarly foldl1) be:
foldr1 :: forall f a b. Foldable1 f => (a -> b -> b) -> (a -> b) -> f a -> b
I understand the logic behind the current signature:
foldr1 :: forall f a b. Foldable1 f => (b -> b -> b) -> f b -> b
In that, if I have a mapping from a -> b, then I can pre-map unconditionally, and derive the latter signature. Unfortunately that's not actually what I want to do:
- I only want the mapping to apply to the terminal value.
- I want to otherwise combine with the combining function.
- I don't want to waste an entire traversal to make the signature work.
I feel like there's a missed opportunity with the current signature. To be honest, I almost never want the current signature.
- Ngôn ngữ chính
- PureScript
- Star
- 51
- Fork
- 57
- Merge trung bình
- 3 ngày 14 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của purescript/purescript-foldable-traversable
-
Add `count`Đang mởstatus: accepted type: enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
purescript/purescript-foldable-traversable#140 · 7 bình luận ·
-
type: documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
purescript/purescript-foldable-traversable#139 · 1 bình luận ·
-
`Data.Traversable` re-exports `sum` from `Data.Foldable` but not `product`Có thể đã có người làm @triallax đã nhận 1959 ngày trước. Đang mởtype: enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
purescript/purescript-foldable-traversable#137 · 5 bình luận ·
-
foldrMĐang mởtype: enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
purescript/purescript-foldable-traversable#136 · 3 bình luận ·
-
purs-0.15 type: breaking change
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
purescript/purescript-foldable-traversable#132 · 4 bình luận ·
Tất cả issue của purescript/purescript-foldable-traversable
Issue tương tự
-
ManageSieve proxy: a backend's NO/BYE greeting is skipped as a capability line and reported as EOFĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Mend: dependency security vulnerability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
ManageIQ/manageiq-pods#1476 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mcp: typed tool handlers lose wrapped JSON-RPC errorsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
modelcontextprotocol/go-sdk#1529 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
FinanceFlash/unvibecode#818 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100