Print int[string] sorted by Value

Paul phshaffer at gmail.com
Wed Oct 28 16:36:32 UTC 2020


On Wednesday, 28 October 2020 at 15:27:04 UTC, H. S. Teoh wrote:

> 		foreach (key; aa.keys.sort!((a,b) => aa[a] < aa[b])) {
> 			writeln(key);

This solution worked perfectly without modifying any of my other 
code.  I don't fully understand it but can study up on the syntax.


More information about the Digitalmars-d-learn mailing list