On 2019-04-07 17:16:12 +0000, Seb said:

Then you can do:

---
["a": 1].byPair.array.sort!((a, b) => a.value < a.value).release.each!writeln;
---

You'll have a sorted array with key and value props.

This seems to be really tricky:

int[uint] myArray;

foreach(key, value; myArray.byPair.array.sort!((a, b) => a.value < a.value)){...}

Error: no property sort for type Tuple!(uint, "key", int, "value")[]


--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

Reply via email to