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.
Because of termination in folds and scans there are two variants - one-shot and repeated.
fold: one-shot foldfoldMany=>groups: repeated folds, consistent with groupsWhilefoldManySepBy=>groupsSepByfoldMaybes: maybe stream folded to a Maybe; one-shotgroupMaybes: maybe stream folded to Maybes in groupsfoldEithers: either stream folded to an Either; one-shotgroupEithers: either stream foled to Eithers in groupsscanlMany=>rescanl: restart the scan after it terminatesChanging
foldManytogroupsmakes it shorter and it is still intuitive and consistent with some other names. Alternatively, we can leave it as is and namegroupMaybes,groupEtiherstofoldManyMaybes,foldManyEithersetc. Or just use inconsistent naming,groupsat some place andfoldManyat others.We can leave
parseManyas is or rename toparseGroups?Similar changes can be made to Folds and Parsers.
--
group*can also be named asrefold*but group is more intuitive--
Refoldcan be named asInfold(suggesting extra input or nesting fusion - likeUnfold) instead to avoid confusion.