Asssociative Array by Key-Value-Pair

H. S. Teoh via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Dec 15 10:06:22 PST 2014


On Mon, Dec 15, 2014 at 02:27:52PM +0000, "Nordlöw" via Digitalmars-d-learn wrote:
> Is there a combined property of AAs that combine keys and values
> typically
> 
> .pairs()
> 
> or
> 
> .byPairs()
> 
> I need to sort the elements of an AA by value and then retrieved
> corresponding keys in the order sorted.

I implemented this before, but it got rejected because people insisted
that it must return a range of Tuple, but Tuple is defined in Phobos and
druntime can't have dependencies on Phobos. :-(

Maybe I'll take another shot at this, since this question keeps coming
up.


T

-- 
LINUX = Lousy Interface for Nefarious Unix Xenophobes.


More information about the Digitalmars-d-learn mailing list