Using a negative argument to select should could the index from the back
In select, support indexes with fewer dimensions than the argument #8
The implementation should mimic the BQN behaviour:
0‿ ̄1⊏4‿2‿3⥊↕25
┌─
╎ 0 1 2
3 4 5
18 19 20
21 22 23
┘
≢0‿ ̄1⊏4‿2‿3⥊↕25
⟨ 2 2 3 ⟩
Examples of how I suspect the operator to behave
> 0 ̄3 ̄1 ⊇ "index"
"idx"
> 0 ̄1 ⊇ 3 3⍴⍳9
┌→────┐
↓0 1 2│
│6 7 8│
└─────┘
> 0 ̄1 ⊇ 5 2 3⍴⍳30
┌┌→───────┐
│↓ 0 1 2│
││ 3 4 5│
│├→───────┤
│↓24 25 26│
││27 28 29│
└└────────┘
Currently, ⊇ does not work on higher-rank arrays, so that will also need to be addressed, but it's behavior should be similar to (⌷⍨∘⊃⍨⍤0 99), as defined by Adám Brudzewsky in his Dyalog Vision, with the addition of supporting negative indices, which are unsupported in Dyalog.
Given n is the length of a list, and i is an index...
A negative index i ≥ ̄n acts as n + i. When i < ̄n, it would still be an Index out of bounds error.
I've built a new Kap today and confirmed feature working as expected on vectors
> 0 ̄3 ̄1 ⊇ "index"
"idx"
> 0 ̄1 ⊇ "a"
"aa"
Flattening a matrix to a vector (and then mixing after) to test it on 2d matrix for now.
> ⊃ 0 ̄1 ⊇ ,/ 3 3⍴⍳9
┌→────┐
↓0 1 2│
│6 7 8│
└─────┘
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?