<br><br><div class="gmail_quote">On Mon, Mar 10, 2008 at 10:13 PM, Adrian Hey &lt;<a href="mailto:ahey@iee.org">ahey@iee.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
(sort [a,b]) in the case we have: (compare a b = EQ)<br>
<br>
Which of the following 4 possible results are correct/incorrect?<br>
1- [a,a]<br>
2- [a,b]<br>
3- [b,a]<br>
4- [b,b]</blockquote><div><br>I&#39;d say 2 and 3 are sane, while 2 is correct - because we need stable sort. Stable - this is the keyword!<br>If `==` would mean identity then we wouldn&#39;t need a stable sorting algorithm.<br>
<br><br>Christopher Skrzêtnicki<br><br><br><br></div></div><br>