On Wednesday, February 06, 2013 01:33:29 bearophile wrote: > This used to print true-false, now prints true-true. Is this a > bug? > > > import std.stdio, std.algorithm; > void main() { > auto x = "abcd"; > writeln(isSorted(x)); > auto y = "acbd"; > writeln(isSorted(y)); > } > > > Maybe this line: > > https://github.com/D-Programming-Language/phobos/blob/master/std/algorithm.d > #L9237 > > for (; !ahead.empty; ahead.popFront(), ++i) > > Should be: > > for (; !ahead.empty; ahead.popFront(), r.popFront(), ++i)
That definitely looks like a bug. "acbd" _isn't_ sorted. - Jonathan M Davis