[WORK] groupBy is in! Next: aggregate

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 26 09:34:45 PST 2015


On 1/26/15 8:11 AM, H. S. Teoh via Digitalmars-d wrote:
> On Mon, Jan 26, 2015 at 11:26:04AM +0000, bearophile via Digitalmars-d wrote:
>> Russel Winder:
>>
>>> but is it's name "group by" as understood by the rest of the world?
>>
>> Nope...
> [...]
>
> I proposed to rename it but it got shot down. *shrug*
>
> We still have a short window of time to sort this out, before 2.067 is
> released...

My suggestion was to keep the name but change the code of your groupBy 
implementation to return tuple(key, lazyValues) instead of just 
lazyValues. That needs to happen only for binary predicates; unary 
predicates will all have alternating true/false keys.

Seems that would please everyone.


Andrei



More information about the Digitalmars-d mailing list