Anonymous user
Sort an array of composite structures: Difference between revisions
Sort an array of composite structures (view source)
Revision as of 00:43, 28 March 2012
, 12 years agoUpdated D entry
(Updated D code) |
(Updated D entry) |
||
Line 481:
{"David", "19"}];
pairs.schwartzSort!(p => p.name)(
writeln(pairs);
}</lang>
{{out}}
<pre>[Pair("Adam", "2341"), Pair("Bernie", "122"), Pair("David", "19"), Pair("Joe", "5531"), Pair("Walter", "1234")]</pre>
|