Some suggested naming changes

Đang mở
#3,164 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
20/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
haskell
Lĩnh vực
devtools

Hướng nghiên cứu

Read the issue’s naming proposals for folds, scans, parsers, and related types. Decide which naming scheme should be consistent across these APIs, then identify the affected definitions and tests; done means the chosen names are applied consistently and the relevant tests pass.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

aspect:api

Because of termination in folds and scans there are two variants - one-shot and repeated.

  • fold: one-shot fold
  • foldMany => groups: repeated folds, consistent with groupsWhile
  • foldManySepBy => groupsSepBy
  • foldMaybes: maybe stream folded to a Maybe; one-shot
  • groupMaybes: maybe stream folded to Maybes in groups
  • foldEithers: either stream folded to an Either; one-shot
  • groupEithers: either stream foled to Eithers in groups
  • scanlMany => rescanl: restart the scan after it terminates

Changing foldMany to groups makes it shorter and it is still intuitive and consistent with some other names. Alternatively, we can leave it as is and name groupMaybes, groupEtihers to foldManyMaybes, foldManyEithers etc. Or just use inconsistent naming, groups at some place and foldMany at others.

We can leave parseMany as is or rename to parseGroups?

Similar changes can be made to Folds and Parsers.

-- group* can also be named as refold* but group is more intuitive
-- Refold can be named as Infold (suggesting extra input or nesting fusion - like Unfold) instead to avoid confusion.

Ngôn ngữ chính
Haskell
Star
926
Fork
71
Merge trung bình
6 giờ 49 phút
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của composewell/streamly

Tất cả issue của composewell/streamly

Issue tương tự

Thêm issue về Haskell

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.