Some suggested naming changes

Aperta
#3,164 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
haskell
Ambito
devtools

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Haskell
Stelle
926
Fork
71
Merge medio
6h 49m
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di composewell/streamly

Tutte le issue di composewell/streamly

Issue simili

Altre issue su Haskell

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.