On Mon, Mar 10, 2008 at 10:13 PM, Adrian Hey <[EMAIL PROTECTED]> wrote:
> > (sort [a,b]) in the case we have: (compare a b = EQ) > > Which of the following 4 possible results are correct/incorrect? > 1- [a,a] > 2- [a,b] > 3- [b,a] > 4- [b,b] I'd say 2 and 3 are sane, while 2 is correct - because we need stable sort. Stable - this is the keyword! If `==` would mean identity then we wouldn't need a stable sorting algorithm. Christopher Skrzętnicki
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe