Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,14 @@
define transpose(m) -> res;
lvars bl = boundslist(m);
if length(bl) /= 4 then
throw([need_2d_array ^a])
endif;
lvars i, i0 = bl(1), i1 = bl(2);
lvars j, j0 = bl(3), j1 = bl(4);
newarray([^j0 ^j1 ^i0 ^i1], 0) -> res;
for i from i0 to i1 do
for j from j0 to j1 do
m(i, j) -> res(j, i);
endfor;
endfor;
enddefine;