Bug 14183 – Updates to groupBy

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-02-15T19:33:00Z
Last change time
2017-07-19T17:42:11Z
Assigned to
peter.alexander.au
Creator
peter.alexander.au

Comments

Comment #0 by peter.alexander.au — 2015-02-15T19:33:15Z
At Andrei's request: http://forum.dlang.org/thread/[email protected] Paraphrased, taking into account amendments: * Perhaps rename groupBy to chunkBy. People coming from SQL and other languages might expect groupBy to do hash-based grouping. * The unary function implementation must return for each group a tuple consisting of the key and the lazy range of values. The binary function implementation should continue to only return the lazy range of values. * SortedRange should add a method called groupBy(). Invoked with no predicate, groupBy() should do what chunkBy does, using the sorting predicate. * aggregate() should be removed until we figure out how best to integrate.
Comment #1 by andrei — 2015-02-15T19:42:39Z
Instead of removing aggregate() it might be a good idea to just undocument it.
Comment #2 by peter.alexander.au — 2015-02-18T21:02:50Z
Comment #3 by github-bugzilla — 2015-03-19T20:04:11Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/c6520969eaa317d373bc288aec49e9e2ca077dc4 Fix Issue 14183 - Changes to groupBy * Renamed `groupBy` to `chunkBy` * Undocumented `aggregate` * Added `groupBy` member function to `SortedRange` * Unary `chunkBy` returns tuple of key and chunk. https://issues.dlang.org/show_bug.cgi?id=14183 https://github.com/D-Programming-Language/phobos/commit/fa297af0e69f5b097fad81263da74d2033fd2541 Merge pull request #3005 from Poita/Issue14183 Fix Issue 14183 - Changes to groupBy
Comment #4 by github-bugzilla — 2015-04-21T21:04:24Z
Commit pushed to stable at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/afd30b41b09b9298f56ccba19068f1fbcab6fbb5 Merge pull request #3005 from Poita/Issue14183 Fix Issue 14183 - Changes to groupBy
Comment #5 by github-bugzilla — 2015-05-18T15:13:18Z
Comment #6 by github-bugzilla — 2015-06-17T21:03:02Z
Comment #7 by github-bugzilla — 2017-07-19T17:42:11Z