[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-apl] Unique of nested arrays doesn't work
From: |
Kacper Gutowski |
Subject: |
Re: [Bug-apl] Unique of nested arrays doesn't work |
Date: |
Fri, 14 Feb 2014 18:16:01 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On 2014-02-14 16:15:33, Juergen Sauermann wrote:
> fixed in SVN 120.
In r122, it doesn't give domain error anymore, but I think that
results are not correct:
⎕RL
1
8⎕CR Y←⊂[1]?2 10⍴2
┌→──────────────────────────────────────────────────────────┐
│┌→──┐ ┌→──┐ ┌→──┐ ┌→──┐ ┌→──┐ ┌→──┐ ┌→──┐ ┌→──┐ ┌→──┐ ┌→──┐│
││2 2│ │2 2│ │2 1│ │1 1│ │2 2│ │1 2│ │1 1│ │2 2│ │1 2│ │1 2││
│└───┘ └───┘ └───┘ └───┘ └───┘ └───┘ └───┘ └───┘ └───┘ └───┘│
└∊──────────────────────────────────────────────────────────┘
8⎕CR Z←∪Y
┌→────────────────────────────────────────┐
│┌→──┐ ┌→──┐ ┌→──┐ ┌→──┐ ┌→──┐ ┌→──┐ ┌→──┐│
││2 2│ │2 1│ │1 1│ │2 2│ │1 2│ │1 1│ │1 2││
│└───┘ └───┘ └───┘ └───┘ └───┘ └───┘ └───┘│
└∊────────────────────────────────────────┘
8⎕CR ((Y⍳Y)=⍳⍴Y)/Y←,Y ⍝ ←→ ∪Y
┌→──────────────────────┐
│┌→──┐ ┌→──┐ ┌→──┐ ┌→──┐│
││2 2│ │2 1│ │1 1│ │1 2││
│└───┘ └───┘ └───┘ └───┘│
└∊──────────────────────┘
Z[1] ≡ Z[4]
1
-k