fix flags of take_head

This commit is contained in:
dzaima 2024-09-14 16:15:11 +03:00
parent f3c63d3887
commit 884d61476f
2 changed files with 5 additions and 0 deletions

View File

@ -94,6 +94,7 @@ static Arr* take_head(usz ria, B x) { // consumes; returns ria↑x with unset sh
inplace_ok:;
reinit_portion(a(x), ria, xia);
arr_shErase(a(x), 1);
FL_KEEP(x, fl_asc|fl_dsc);
a(x)->ia = ria;
return a(x);

View File

@ -260,6 +260,10 @@ w←1‿1⥊1 ⋄ x←2⥊1 ⋄ w‿x <¨↩ ⋄ {! (∾⟨•Repr𝕩,": Expe
!"↑: Argument must have rank at least 1" % 0
!"↓: Argument must have rank at least 1" % <0
# 𝕨↓𝕩 & 𝕨↑𝕩
•Hash¨ ¯1•internal.Squeeze 1e9˜10000, 10000 %% 1
•Hash¨ 10000•internal.Squeeze 1e9˜10000, 10000 %% 1
# ¨
1 {𝕊:12}¨ 1 %% <12
1 {𝕊:12}¨<1 %% <12