Talk:OpenSCAD User Manual/List Comprehensions

In the third example for "each", is the result incorrect?

A = [-2, each [1:2:5], each [6:-2:0], -1]; echo([ for (a = A) 2 * a ]); // ECHO: [-4, 2, 6, 10, 12, 8, 4, 0, -2]

Why isn't it? // ECHO: [-4, 2, 4, 10, 12, -4, 0, -2]

Because [1:2:5] is a range producing values 1, 3, 5 and [6:-2:0] gives 6, 4, 2, 0.