Anonymous user
Sort stability: Difference between revisions
→{{header|Groovy}}: add version info
(→{{header|Groovy}}: new solution) |
(→{{header|Groovy}}: add version info) |
||
Line 112:
Example:
{{trans|Java}}
{{works with|Groovy|1.8.1}}
<lang groovy>def cityList = ['UK London', 'US New York', 'US Birmingham', 'UK Birmingham',].asImmutable()
[
Line 148 ⟶ 149:
US New York
US Birmingham</pre>
=={{header|Haskell}}==
Haskell's <tt>sort</tt> and <tt>sortBy</tt> functions are guaranteed stable.[http://www.haskell.org/onlinereport/list.html#sect17.3]
|