Some suggested naming changes

Abierto
#3,164 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
20/100
Tipo de issue
Refactorización
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
haskell
Área
devtools

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Haskell
Estrellas
926
Forks
71
Merge medio
6 h 49 min
PR fusionados (30 d)
3

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de composewell/streamly

Todos los issues de composewell/streamly

Issues similares

Más issues de Haskell

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.