## list f ⍨ ←

General APL language issues

### list f ⍨ ←

`      ⊢z x c←⍳¨3 4 5     ⍝ set┌─────┬───────┬─────────┐│0 1 2│0 1 2 3│0 1 2 3 4│└─────┴───────┴─────────┘      1 2 3↓z x c        ⍝ 0RANK ERROR      1 2 3↓z x c        ⍝ 0     ∧      1 2 3↓¨z x c       ⍝ 1┌───┬───┬───┐│1 2│2 3│3 4│└───┴───┴───┘      z x c↓⍨←1 2 3      ⍝ 2      z x c┌───┬───┬───┐│1 2│2 3│3 4│└───┴───┴───┘      ⊢z x c←⍳¨3 4 5     ⍝ reset┌─────┬───────┬─────────┐│0 1 2│0 1 2 3│0 1 2 3 4│└─────┴───────┴─────────┘      z x c↓¨⍨←1 2 3     ⍝ 3      z x c┌────┬─────┬──────┐│┌┬┬┐│┌┬┬┬┐│┌┬┬┬┬┐│││││││││││││││││││││└┴┴┘│└┴┴┴┘│└┴┴┴┴┘│└────┴─────┴──────┘`
I always but always get confused and have to try lots of things in the session before I get algorithms like these correct.
a b c↓⍨← . . .
a b c/⍨← . . .
a b c↓¨⍨← . . .
a b c/¨⍨← . . .
I can nowhere find any reference to this kind of assignment in the help. Is there such a page? Can we have one if not. One that explains why (2) above works but (0) doesn't even though (3) (which doesn't do at all what I expected) is nearer kin to (1) that it is to (0). (if you know what I mean.)

Actually, having composed the above I'm so conversant with it that I probably won't need the page. For at least a couple of days. But posting anyway in case anyone else is confused.

Phil Last

Posts: 572
Joined: Thu Jun 18, 2009 6:29 pm

### Re: list f ⍨ ←

I agree this should be spelled out more in the help:

`      ⍝ Modified assignment includes an implicit each:      v←0 0 0       ⎕io←1      v[2 2 3 2] +← 1    ⍝ handy histogram technique      v0 3 1      )copy dfns tc... saved ...            v←0 0 0             ⍝ reset      v[2 2 3 2] +tc← 1   ⍝ again with tracing0  +  1  =>  11  +  1  =>  20  +  1  =>  12  +  1  =>  3            i←0      i i i +← 1      i3      i←0      i i i +tc← 10  +  1  =>  11  +  1  =>  22  +  1  =>  3      ⍝ similarly (with ⎕io=1):      z x c←⍳¨3 4 5            z x c ↓tc⍨← 1 2 3    ⍝ with implicit each1  ↓  1 2 3  =>  2 3 2  ↓  1 2 3 4  =>  3 4 3  ↓  1 2 3 4 5  =>  4 5             z x c←⍳¨3 4 5        ⍝ reset            z x c ↓tc¨⍨← 1 2 3   ⍝ with additional explicit each1  ↓  1  =>   1  ↓  2  =>   1  ↓  3  =>   2  ↓  1  =>   2  ↓  2  =>   2  ↓  3  =>   2  ↓  4  =>   3  ↓  1  =>   3  ↓  2  =>   3  ↓  3  =>   3  ↓  4  =>   3  ↓  5  =>`
JohnS|Dyalog

Return to Language

### Who is online

Users browsing this forum: No registered users and 1 guest