Zig-zag matrix: Difference between revisions

m
→‎{{header|J}}: restate "edge cases" comment for clarity.
m (→‎{{header|J}}: restate "edge cases" comment for clarity.)
Line 2,666:
10 18 19 23 24</syntaxhighlight>
 
(Also, of course, <code>($ [: /:@; <@|.`</.@i.)@,~0</code> creates a result with 0 rows and 0 columns. And, with an argument of 1, the result has one row and one column with the value <code>0</code>. And, the other expressions behave the same.)
By the way, all the edge cases are handled transparently,
 
without any special checks.
Furthermore, by simply ''removing'' the trailing <tt>@,~</tt>
from the solutions, they automatically generalize
6,962

edits