Re: Differences between group() and chunkBy()

2018-11-14 Thread Dennis via Digitalmars-d-learn
On Wednesday, 14 November 2018 at 12:28:38 UTC, Per Nordlöw wrote: Is it because of `group` has a default for the predicate whereas `chunkBy` hasn't. chunkBy splits the range into smaller ranges, group actually returns tuples of the item and the amount of occurences. Because in group the

Differences between group() and chunkBy()

2018-11-14 Thread Per Nordlöw via Digitalmars-d-learn
Why is there at https://dlang.org/phobos/std_algorithm_iteration.html an inconsistency in naming of `group` and chunkBy`? Is it because of `group` has a default for the predicate whereas `chunkBy` hasn't. Further, why aren't the two merged into a single iteration algorithm?