Sort stability: Difference between revisions

added Julia example
(→‎{{header|D}}: Add Déjà Vu)
(added Julia example)
Line 330:
UK,Birmingham,US,Birmingham,UK,London,US,New York</pre>
 
=={{header|Julia}}==
 
Julia's built-in <code>sort</code> function is documented to be stable by default (although non-stable sort algorithms can optionally be selected).
<pre>
julia> A = [("UK", "London"), ("US", "New York"), ("US", "Birmingham"), ("UK", "Birmingham")];
julia> sort(A, by=x -> x[2])
4-element Array{(ASCIIString,ASCIIString),1}:
("US","Birmingham")
("UK","Birmingham")
("UK","London")
("US","New York")
</pre>
 
=={{header|Lasso}}==
Anonymous user