Using std.algorithm how to uniq and sort a multidimensional array?

Meta jared771 at gmail.com
Tue Jan 28 07:15:06 PST 2014


On Tuesday, 28 January 2014 at 15:07:26 UTC, bearophile wrote:
> Gary Willoughby:
>
>>    string[][] tags;
>>
>>    tags = tags.uniq!("a[0][1] == b[1][1]").array;
>
> I think the right abstraction for your use case is:
>
> auto tags = tags.flatten.uniq.array;

auto tags = tags.flatMap!uniq.array ?


More information about the Digitalmars-d-learn mailing list