Array.explode()


Array.explode(StartIndex, By, RecurseTillLevel)

Explode each element into a sequence from StartIndex (default 0), incrementing by By (default 1). This is repeated until RecurseTillLevel (default 0) of the last leaf of the multidimensional array.

1..10.explode()

0
0 1
0 1 2
0 1 2 3
0 1 2 3 4
0 1 2 3 4 5
0 1 2 3 4 5 6
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8 9

MAGICSQUARE(3).explode(1,1,1)

1
2
1
2
3
4
5
6
7
1
2
3
4
5
6
1
2
3
4
5
6
7
8
9
1
2
3
4
5
1
1
2
3
4
1
2
3
1
2
3
4
5
6
7
8


See Also

Implode

Unimplode

Unimplodeleaf