diff options
-rw-r--r-- | functions.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |