On Fri, 2017-03-17 at 19:21 +0000, John Colvin via Digitalmars-d-learn
wrote:
> […]
>
> reduce is a free function in std.algorithm. Just import it and
> you're away. Anyway, is this what you wanted?
>
> string[] blah(string[][string] groups)
> {
> import std.algorithm : map, joiner;
> import std.array : array, byPair;
> return groups.byPair()
> .map!(a =>
> a[1].sort!debianPackageNumberComparator()[0..$-1])
> .joiner
> .array;
> }Yes it is. I had failed to import joiner in previous experiments. I feel sufficiently like an idiot now, that I shall imbibe excessively of the Ricard. However on the upside the code work very declaratively. :-) -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:[email protected] 41 Buckmaster Road m: +44 7770 465 077 xmpp: [email protected] London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
signature.asc
Description: This is a digitally signed message part
