[Issue 14183] New: Updates to groupBy
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Feb 15 11:33:15 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14183
Issue ID: 14183
Summary: Updates to groupBy
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: Phobos
Assignee: nobody at puremagic.com
Reporter: peter.alexander.au at gmail.com
At Andrei's request:
http://forum.dlang.org/thread/mblg03$k0u$1@digitalmars.com
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.
--
More information about the Digitalmars-d-bugs
mailing list