Bug 4806 – Typo in transversal

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-09-03T10:20:00Z
Last change time
2011-02-03T13:29:27Z
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2010-09-03T10:20:27Z
Code from: http://www.digitalmars.com/d/2.0/phobos/std_range.html#transversal int[][] x = new int[][2]; x[0] = [1, 2]; x[1] = [3, 4]; auto ror = transversal(x, 1); assert(equals(ror, [ 2, 4 ][])); Last line should be: assert(equal(ror, [ 1, 3 ][]));
Comment #1 by bugzilla — 2011-02-03T01:59:02Z
Nope, [2, 4] is correct. [1, 3] are the 0th elements. The equals->equal typo was fixed in https://github.com/D-Programming-Language/phobos/commit/3ec3fee75ae62aa72946d6ae5a132f5159ff0f9c
Comment #2 by andrej.mitrovich — 2011-02-03T13:29:27Z
You're right. It must have been a brainfart. :)