KennyTM~ Wrote:

> No. Because comp("foo", "foo") == true, but should return false when the 
> two keys are equal.
> 
> 
> BTW, the following code can reproduce your "bug":
> 
> import std.algorithm;
> void main() {
>     sort!("a <= b")( [2,1].dup );
> }

I guess that's why I should use   return x<y   and not   return x<=y   , btw I 
didn't know that "<" and the like work with strings.
I actually don't know why it swaps two elements which are equal. I guess it's 
something advanced.

Thanks for illustrating.

Reply via email to