Problem with map, reduce, ..

Stefan via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 24 01:58:09 PDT 2015


On Wednesday, 24 June 2015 at 08:33:29 UTC, Adrian Matoga wrote:
> On Wednesday, 24 June 2015 at 08:30:29 UTC, Adrian Matoga wrote:
>> input.byLine() yields char[]'s as range elements, while props 
>> is (correctly) indexed by strings, i.e. immutable(char)[].
>
> Ooops, more precisely it's because of the second argument of 
> add() being string, but the solution above still applies.

Thanks! That does it!

Any idea how to make the 'ugly' reduce step more 'pleasant'? I.e. 
make it a part of the filter, map, .. chain?


More information about the Digitalmars-d-learn mailing list