Comment #0 by andrej.mitrovich — 2010-09-03T08:36:15Z
From http://www.digitalmars.com/d/2.0/phobos/std_range.html#Retro
Full example:
import std.range;
import std.algorithm;
void main()
{
int[] a = [ 1, 2, 3, 4, 5 ];
assert(equal(retro(a) == [ 5, 4, 3, 2, 1 ][]));
}
The assert should be:
assert(equal(retro(a), [ 5, 4, 3, 2, 1 ][]));
Comment #1 by andrej.mitrovich — 2010-09-03T08:37:13Z
One other thing, what is the purpose of the extra square brackets next to the array literal?
This compiles fine as well:
assert(equal(retro(a), [ 5, 4, 3, 2, 1 ]));