Array.diagonal()
Revision as of 11:44, 10 April 2020 by Joseph (talk | contribs) (→Array.diagonal(nthDiagonalIndex))
Array.diagonal(nthDiagonalIndex)
Extract the diagonal at nthDiagonalIndex (-ve for diagonals below the proper diagonal, and zero for the proper diagonal).
|4|.diagonal(0..2)
|4|.diagonal(0)
|4|.diagonal(-1..1)