On 06/16/2012 06:41 PM, Timon Gehr wrote:
On 06/16/2012 06:34 PM, maarten van damme wrote:Right now I have an associative array "int[string] aa" and stored the keys in "string[] keys". Now I want to sort keys[] so that "aa[keys[0]]>aa[keys[1]]" I remember someone gave the answer to that question on stackoverflow but after some googling I couldn't find the right answer.maartenschwartzSort!(k=>aa[k])(keys);
oops. Seems like you actually want schwartzSort!(k=>aa[k],"a > b")(keys);