native ≍⁼⍟k 𝕩

This commit is contained in:
dzaima 2024-08-23 02:44:49 +03:00
parent 5ef4fe828b
commit 06689960a5
2 changed files with 26 additions and 0 deletions

View File

@ -5,6 +5,7 @@
#include <math.h> #include <math.h>
B fne_c1(B, B); B fne_c1(B, B);
B shape_c1(B, B);
B shape_c2(B, B, B); B shape_c2(B, B, B);
B transp_c2(B, B, B); B transp_c2(B, B, B);
B take_c2(B, B, B); B take_c2(B, B, B);
@ -583,6 +584,18 @@ B for_cells_c1(B f, u32 xr, u32 cr, u32 k, B x, u32 chr) { // F⎉cr x; array x,
} }
break; break;
} }
case n_undo: if (isFun(fd->f)) {
u8 frtid = v(fd->f)->flags-1;
if (frtid==n_couple && cr!=0 && xsh[k]==1) {
assert(xr>=2);
if (xr==2) return C1(shape, x);
Arr* r = cpyWithShape(x); xsh=PSH(r);
ShArr* rsh = m_shArr(xr-1);
shcpy(rsh->a, xsh, k);
shcpy(rsh->a+k, xsh+k+1, xr-k-1);
return taga(arr_shReplace(r, xr-1, rsh));
}
} break;
} }
} else if (TY(f) == t_md2D) { } else if (TY(f) == t_md2D) {
Md2D* fd = c(Md2D,f); Md2D* fd = c(Md2D,f);

View File

@ -103,6 +103,19 @@
[21,45]˘ 108100 %% (8×10) + [21,45] [21,45]˘ 108100 %% (8×10) + [21,45]
[11,01]˘ 1022100 %% (4×10) + 22223230123 [11,01]˘ 1022100 %% (4×10) + 22223230123
˘ 10110 %% 10
˘ 101330 %% 10330
˘ 1013260 %% 103260
¯2 4218 %% 428
¯2 421324 %% 42324
¯2 4213248 %% 423248
1 "foo" %% <"foo"
1 10 %% <10
!"≍⁼: Argument must have a leading axis of 1" % ˘ 1102
!"≍⁼: Argument must have a leading axis of 1" % ¯2 112111
!"≍⁼: Argument must have a leading axis of 1" % ¯2 1110
!"≍⁼: Argument must have a leading axis of 1" % 0 10
( (
%USE IS_HEAPVERIFY %USE IS_HEAPVERIFY
# big ˝˘ & `˘ tester # big ˝˘ & `˘ tester