aa.byKeyValue().sort!"a.key < b.key"
H. S. Teoh via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jun 27 05:24:55 PDT 2015
On Sat, Jun 27, 2015 at 12:22:06PM +0000, Nicholas Wilson via Digitalmars-d-learn wrote:
> How do I iterate through an AA sorted by key?
>
> I am unable to .dup the aa.byKeyValue().
Because it is a range, not an array.
To turn it into an array, write:
aa.byKeyValue().array.sort!"a.key < b.key"
T
--
Three out of two people have difficulties with fractions. -- Dirk Eddelbuettel
More information about the Digitalmars-d-learn
mailing list