From 232190126274508840b3511554892cb1bc78351c Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Sat, 12 Feb 2022 15:30:01 +0000 Subject: =?UTF-8?q?Handle=20prototypes=20better=20in=20unique=20=E2=88=AA?= =?UTF-8?q?=20and=20mix=20=E2=86=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/functions.c b/functions.c index 576fc4c..46cbe7a 100644 --- a/functions.c +++ b/functions.c @@ -490,8 +490,10 @@ fnTally(Array *right) Array * fnMix(Array *right) { - if(GetType(right) != AtypeArray || GetSize(right) == 0) + if(GetType(right) != AtypeArray) return fnSame(right); + if(GetSize(right) == 0) + return rundfn(L"((⍴⍵),⍴⊃⍵)⍴⊃⍵", nil, nil, nil, right); int commonrank = 0; int i,j; @@ -720,6 +722,8 @@ fnUnique(Array *right) { if(GetRank(right) == 0) return fnRavel(right); + if(GetSize(right) == 0) + return fnSame(right); return rundfn(L"(≠⍵)⌿⍵", nil, nil, nil, right); } -- cgit v1.2.3