### Indexing Operators

.

Op Code Result
D .. Range 5..10 \$;
2.._2 \$;
1..3.._1 \$;
10=>b;20=>e;2=>i;
b+(0..(e-b/i)*i) \$;
5 6 7 8 9 10
2 1 0 _1 _2
1 2 3 2 1 0 _1

10 12 14 16 18 20
M ` Index Generator 5` 1 2 3 4 5
D ` Index Of 1..4 ` (5..0) \$;
'abc.ABC' ` 'abc+ABCx' \$;
'abc.ABC'@== ` 'abc+ABCx' \$;
'abc''DEF'`('def''Abc') \$;
'abc''DEF'@== `('def''abc') \$;
0 4 3 2 1 0
1 2 3 4 1 2 3 0
1 2 3 0 5 6 7 0
2 1
0 1
`&  Index of Unique All '<1>:'( 1 2 3 1 5 2 4 `&) \$;
'<2>:'('ABC.+abc' `& )\$;
'<3>:'('ABC.+abc' @== `&) \$;
'<4>:'('abc''ABC''aBc' `& ) \$;
'<5>:'('abc''ABC''aBc' @== `& ) \$;
In development
D `& Index Of All '<1>:' (1..5 `& (2..4)) \$;
'<2>:'('ABCabc' `& 'abc') \$;
'<3>:'('ABCabc' @== `& 'abc') \$;
'<4>:'('abc.ABC'@== `& 'abc+ABCx') \$;
'<5>:'('abc''DEF'`& ('def''Abc')) \$;
'<6>:'('abc''DEF'@== `& ('def''abc')) \$;
In development
D `| Index Of Any '<1>:NI '(1..5 `& (2..4)) \$;
'<2>:'('ABCabc' `| 'abc') \$;
'<3>:'('ABCabc' @== `| 'abc') \$;
'<4>:'('abc.ABC'@== `| 'abc+ABCx') \$;
'<5>:'('abc''DEF'`| ('def''Abc')) \$;
'<6>:'('abc''DEF'@== `| ('def''abc')) \$;
In development
D `` Indices Of 1 2 3 1 3 3 2 =>n;
'<1>------' \$;
n `` (0..4) %** \$;
'<2>------' \$;
'A''b''a''c'' a''b' => t;
t `` ('a''b''c') %** \$;
'<3>------' \$;
'A''b''a''c'' a''b' => t;
t @== `` ('a''b''c') %** \$;
<1>------
Seq[I690R1C5T:K]:
[1]KNum[0]NULL
[2]Num[I696R1C2:I]1 4
[3]Num[I699R1C2:I]2 7
[4]Num[I702R1C3:I]3 5 6
[5]KNum[0]NULL
<2>------
Seq[I784R1C3T:K]:
[1]Num[I785R1C3:I]1 3 5
[2]Num[I786R1C2:I]2 6
[3]Num[I787R1C1:I]4
<3>------
Seq[I868R1C3T:K]:
[1]Num[I869R1C1:I]3
[2]Num[I870R1C2:I]2 6
[3]Num[I871R1C1:I]4
M ``& Indices of Unique All '<1>--------------'\$;
10 20 10 40 30 20 ``& %** \$;
'<2>--------------'\$;
'<3>--------------'\$;
'abc''def''abc' ``& %** \$;
'<4>--------------'\$;
1'a'=>x;'b'2=>y;
x y x ``& %** \$;
<1>--------------
Seq[I829R1C4T:K]:
[1]Num[I830R1C2:I]1 3
[2]Num[I831R1C2:I]2 6
[3]Num[I832R1C1:I]5
[4]Num[I833R1C1:I]4
<2>--------------
Seq[I852R1C4T:K]:
[1]Num[I853R1C3:I]1 3 5
[2]Num[I854R1C1:I]2
[3]Num[I855R1C2:I]4 7
[4]Num[I856R1C1:I]6
<3>--------------
Seq[I880R1C2T:K]:
[1]Num[I881R1C2:I]1 3
[2]Num[I882R1C1:I]2
<4>--------------
Seq[I33R1C2T:K]:
[1]Num[I34R1C2:I]1 3
[2]Num[I35R1C1:I]2
M ``& Indices of Unique Any   In development
D ``& Indices of All   In development
D ``| Indices of Any   In development
M & Unique '<1>--------------'\$;
5%%5?10 =>n \$;
'<2>--------------'\$;
n & \$;
'<3>--------------'\$;
"Row, row, row your boat" => t;
t \& => s %** \$;
'<4>--------------'\$;
s & %** \$;
'<5>--------------'\$;
s @== & %** \$;
<1>--------------
1 5 4 4 5
<2>--------------
1 4 5
<3>--------------
Seq[I116R1C5T:K]:
[1]String[I80R2C3:C]Row
[2]String[I81R2C3:C]row
[3]String[I82R2C3:C]row
[4]String[I83R2C4:C]your
[5]String[I84R2C4:C]boat
<4>--------------
Seq[I156R1C3T:K]:
[1]String[I84R2C4:C]boat
[2]String[I80R2C3:C]Row
[3]String[I83R2C4:C]your
<5>--------------
Seq[I199R1C4T:K]:
[1]String[I84R2C4=C]boat
[2]String[I81R2C3=C]row
[3]String[I80R2C3=C]Row
[4]String[I83R2C4=C]your
M -> Last 1 2 3 -> \$;
'abc' -> \$;
'abc' 'def' 'ghi' -> \$;
3
c
ghi
D -> RT Take Zero Fill;
(-)RT Drop
'<1>--------------'\$;
1 2 3  -> 2 %** \$;
'<2>--------------'\$;
1 2 3  -> 4 %** \$;
'<3>--------------'\$;
1 2 3  -> _1 %** \$;
'<4>--------------'\$;
1 2 3  -> _4 %** \$;
'<5>--------------'\$;
'*ab.' -> 5 \$;
'<6>--------------'\$;
'abc''def' -> 3 %** \$;
<1>--------------
Num[I693R1C2:I]2 3
<2>--------------
Num[I725R1C4:I]0 1 2 3
<3>--------------
Num[I757R1C2:I]1 2
<4>--------------
KNum[0]NULL
<5>--------------
*ab.
<6>--------------
Seq[I828R1C3T:K]:
[1]Nil[I829R1C1:*]
[2]String[I821R1C3:C]abc
[3]String[I823R1C3:C]def
D *-> RT Take First Fill '<1>--------------'\$;
1 2 3  *-> 2 %** \$;
'<2>--------------'\$;
1 2 3  *-> 4 %** \$;
'<3>--------------'\$;
1 2 3  *-> _1 %** \$;
'<4>--------------'\$;
1 2 3  *-> _4 %** \$;
'<5>--------------'\$;
'*ab.' *-> 5 \$;
'<6>--------------'\$;
'abc''def' *-> 3 %** \$;
<1>--------------
Num[I56R1C2:I]2 3
<2>--------------
Num[I88R1C4:I]1 1 2 3
<3>--------------
Num[I120R1C2:I]1 2
<4>--------------
KNum[0]NULL
<5>--------------
**ab.
<6>--------------
Seq[I191R1C3T:K]:
[1]String[I184R2C3:C]abc
[2]String[I184R2C3:C]abc
[3]String[I186R1C3:C]def
M <- First 1 2 3 <- \$;
'abc' <- \$;
'abc' 'def' 'ghi' <- \$;
1
a
abc
D <- LT Take;
(-)LT Drop
'<1>--------------'\$;
1 2 3  <- 2 \$;
'<2>--------------'\$;
1 2 3  <- 4 \$;
'<3>--------------'\$;
1 2 3  <- _1 \$;
'<4>--------------'\$;
1 2 3  <- _4 \$;
'<5>--------------'\$;
'*ab.' <-5 %**\$;
'<6>--------------'\$;
'abc''def' <- 3 %**\$;
<1>--------------
1 2
<2>--------------
1 2 3 0
<3>--------------
2 3
<4>--------------

<5>--------------
String[I634R1C5:C]*ab.
<6>--------------
Seq[I661R1C3T:K]:
[1]String[I654R1C3:C]abc
[2]String[I656R1C3:C]def
[3]Nil[I662R1C1:*]
D <-* LT Take Last Fill '<1>--------------'\$;
1 2 3  <-* 2 \$;
'<2>--------------'\$;
1 2 3  <-* 4 \$;
'<3>--------------'\$;
1 2 3  <-* _1 \$;
'<4>--------------'\$;
1 2 3  <-* _4 \$;
'<5>--------------'\$;
'*ab.' <-* 5 \$;
'<6>--------------'\$;
'abc''def' <-* 3 %** \$;
<1>--------------
1 2
<2>--------------
1 2 3 3
<3>--------------
2 3
<4>--------------

<5>--------------
*ab..
<6>--------------
Seq[I77R1C3T:K]:
[1]String[I70R1C3:C]abc
[2]String[I72R2C3:C]def
[3]String[I72R2C3:C]def
5 %% 5?10 => n \$;
'<2>--------------'\$;
n ``> \$;
'<3>--------------'\$;
n @== ``> \$;
'<4>--------------'\$;
'Easy come, easy go.' \| => t %**\$;
'<5>--------------'\$;
t ``> \$;
'<6>--------------'\$;
t[t ``>] %**\$;
'<7>--------------'\$;
t @== ``> \$;
'<8>--------------'\$;
t[t @== ``>] %**\$;
<1>--------------
1 5 4 4 5
<2>--------------
1 3 4 2 5
<3>--------------
1 3 4 2 5
<4>--------------
Seq[I986R1C4T:K]:
[1]String[I951R2C4:C]Easy
[2]String[I952R2C4:C]come
[3]String[I953R2C4:C]easy
[4]String[I954R2C2:C]go
<5>--------------
2 1 3 4
<6>--------------
Seq[I87R1C4T:K]:
[1]String[I952R2C4:C]come
[2]String[I951R2C4:C]Easy
[3]String[I953R2C4:C]easy
[4]String[I954R2C2:C]go
<7>--------------
2 3 1 4
<8>--------------
Seq[I193R1C4T:K]:
[1]String[I952R2C4=C]come
[2]String[I953R2C4=C]easy
[3]String[I951R2C4=C]Easy
[4]String[I954R2C2=C]go
5 %% 5?10 => n \$;
'<2>--------------'\$;
n ``< \$;
'<3>--------------'\$;
n @== ``< \$;
'<4>--------------'\$;
'Easy come, easy go.' \| => t %**\$;
'<5>--------------'\$;
t ``< \$;
'<6>--------------'\$;
t[t ``<] %**\$;
'<7>--------------'\$;
t @== ``< \$;
'<8>--------------'\$;
t[t @== ``<] %**\$;
<1>--------------
1 5 4 4 5
<2>--------------
2 5 3 4 1
<3>--------------
2 5 3 4 1
<4>--------------
Seq[I299R1C4T:K]:
[1]String[I264R2C4:C]Easy
[2]String[I265R2C4:C]come
[3]String[I266R2C4:C]easy
[4]String[I267R2C2:C]go
<5>--------------
4 1 3 2
<6>--------------
Seq[I400R1C4T:K]:
[1]String[I267R2C2:C]go
[2]String[I266R2C4:C]Easy
[3]String[I264R2C4:C]easy
[4]String[I265R2C4:C]come
<7>--------------
4 1 3 2
<8>--------------
Seq[I506R1C4T:K]:
[1]String[I267R2C2=C]go
[2]String[I264R2C4=C]Easy
[3]String[I266R2C4=C]easy
[4]String[I265R2C4=C]come
M >>> Sort Up '<1>--------------'\$;
4 2 1 5 >>> \$;
'<2>--------------'\$;
('A BC' 1) ('D ef') (1 2 3)
('d EF') ('ab c') (1 2 1) => x;
x >>> %** \$;
'<3>--------------'\$;
x @== >>> %** \$;
<1>--------------
1 2 4 5
<2>--------------
Seq[I683R1C6T:K]:
[1]Num[I631R2C3:I]1 2 1
[2]Num[I570R2C3:I]1 2 3
[3]Seq[I525R2C2T:K]:
*[1]String[I520R1C4:C]A BC
*[2]Num[I522R1C1:I]1
[4]String[I604R2C4:C]ab c
[5]String[I542R2C4:C]D ef
[6]String[I587R2C4:C]d EF
<3>--------------
Seq[I722R1C6T:K]:
[1]Num[I631R2C3=I]1 2 1
[2]Num[I570R2C3=I]1 2 3
[3]Seq[I525R2C2T:K]:
*[1]String[I520R1C4:C]A BC
*[2]Num[I522R1C1:I]1
[4]String[I604R2C4=C]ab c
[5]String[I587R2C4=C]d EF
[6]String[I542R2C4=C]D ef
M <<< Sort Dn '<1>--------------'\$;
4 2 1 5 <<< \$;
'<2>--------------'\$;
('A BC' 1) ('D ef') (1 2 3)
('d EF') ('ab c') (1 2 1) => x;
x <<< %** \$;
'<3>--------------'\$;
x @== <<< %** \$;
<1>--------------
5 4 2 1
<2>--------------
Seq[I230R1C6T:K]:
[1]String[I89R2C4:C]D ef
[2]String[I134R2C4:C]d EF
[3]String[I151R2C4:C]ab c
[4]Seq[I72R2C2T:K]:
*[1]String[I67R1C4:C]A BC
*[2]Num[I69R1C1:I]1
[5]Num[I117R2C3:I]1 2 3
[6]Num[I178R2C3:I]1 2 1
<3>--------------
Seq[I269R1C6T:K]:
[1]String[I89R2C4=C]D ef
[2]String[I134R2C4=C]d EF
[3]String[I151R2C4=C]ab c
[4]Seq[I72R2C2T:K]:
*[1]String[I67R1C4:C]A BC
*[2]Num[I69R1C1:I]1
[5]Num[I117R2C3=I]1 2 3
[6]Num[I178R2C3=I]1 2 1
M >-> RT Shift 1 '<1>--------------'\$;
1 2 3 4 >-> \$;
'<3>--------------'\$;
'abcdefg' >->  \$;
'<5>--------------'\$;
'11100'&'1' >->\$;
<1>--------------
Nil 1 2 3
<3>--------------
.abcdef
<5>--------------
01110
D >-> n RT Shift n '<1>--------------'\$;
1 2 3 4 >-> 2 \$;
'<2>--------------'\$;
1 2 3 4 >-> _2 \$;
'<3>--------------'\$;
'abcdefg' >-> 2 \$;
'<4>--------------'\$;
'abcdefg' >-> _2 \$;
'<5>--------------'\$;
'11100'&'1' >-> 1\$;
'<6>--------------'\$;
'11100'&'1' >-> _1\$;
<1>--------------
Nil Nil 1 2
<2>--------------
3 4 Nil Nil
<3>--------------
..abcde
<4>--------------
cdefg..
<5>--------------
01110
<6>--------------
11000
M <-< LT Shift 1 '<1>--------------'\$;
1 2 3 4 <-<  \$;
'<3>--------------'\$;
'abcdefg' <-<  \$;
'<5>--------------'\$;
'11100'&'1' <-< \$;
<1>--------------
2 3 4 Nil
<3>--------------
bcdefg.
<5>--------------
11000
D <-<
n
LT Shift n '<1>--------------'\$;
1 2 3 4 <-< 2 \$;
'<2>--------------'\$;
1 2 3 4 <-< _2 \$;
'<3>--------------'\$;
'abcdefg' <-< 2 \$;
'<4>--------------'\$;
'abcdefg' <-< _2 \$;
'<5>--------------'\$;
'11100'&'1' <-< 1\$;
'<6>--------------'\$;
'11100'&'1' <-< _1\$;
<1>--------------
3 4 Nil Nil
<2>--------------
Nil Nil 1 2
<3>--------------
cdefg..
<4>--------------
..abcde
<5>--------------
11000
<6>--------------
01110
M >%> RT Rotate 1 '<1>--------------'\$;
4 2 1 5 >%> \$;
'<2>--------------'\$;
'abcdef'>%>  \$;
'<3>--------------'\$;
"1101"&"1" >%>\$;
'<4>--------------'\$;
'abc'
1 2 3
'def'
>%>  %** \$;
<1>--------------
5 4 2 1
<2>--------------
fabcde
<3>--------------
1110
<4>--------------
Seq[I658R1C5T:K]:
[1]String[I652R2C3:C]def
[2]String[I641R1C3:C]abc
[3]Num[I643R1C1:I]1
[4]Num[I648R1C1:I]2
[5]Num[I650R1C1:I]3
D >%> RT Rotate n '<1>--------------'\$;
4 2 1 5 >%> 2 \$;
'<2>--------------'\$;
'abcdef' >%> 2 \$;
'<3>--------------'\$;
"1101"&"1" >%> 2\$;
'<4>--------------'\$;
'abc'
1 2 3
'def'
>%> 2 %** \$;
<1>--------------
1 5 4 2
<2>--------------
efabcd
<3>--------------
0111
<4>--------------
Seq[I463R1C5T:K]:
[1]Num[I457R1C1:I]3
[2]String[I459R1C3:C]def
[3]String[I444R1C3:C]abc
[4]Num[I446R1C1:I]1
[5]Num[I455R1C1:I]2
M <%< LT Rotate 1 '<1>--------------'\$;
4 2 1 5 <%< \$;
'<2>--------------'\$;
'abcdef' <%< \$;
'<3>--------------'\$;
"1101"&"1" <%< \$;
'<4>--------------'\$;
'abc'
1 2 3
'def'
<%<  %** \$;
<1>--------------
2 1 5 4
<2>--------------
bcdefa
<3>--------------
1011
<4>--------------
Seq[I904R1C5T:K]:
[1]Num[I889R1C1:I]1
[2]Num[I894R1C1:I]2
[3]Num[I896R1C1:I]3
[4]String[I898R2C3:C]def
[5]String[I887R1C3:C]abc
D <%< LT Rotate n '<1>--------------'\$;
4 2 1 5 <%< 2 \$;
'<2>--------------'\$;
'abcdef' <%< 2 \$;
'<3>--------------'\$;
"1101"&"1" <%< 2\$;
'<4>--------------'\$;
'abc'
1 2 3
'def'
<%< 2 %** \$;
<1>--------------
1 5 4 2
<2>--------------
cdefab
<3>--------------
0111
<4>--------------
Seq[I693R1C5T:K]:
[1]Num[I685R1C1:I]2
[2]Num[I687R1C1:I]3
[3]String[I689R1C3:C]def
[4]String[I674R1C3:C]abc
[5]Num[I676R1C1:I]1
M >%< Flip '<1>--------------'\$;
4 2 1 5 >%<\$;
'<2>--------------'\$;
'abcdef' >%< \$;
'<3>--------------'\$;
"1101"&"1" >%<\$;
'<4>--------------'\$;
'abc'
1 2 3
'def'
>%< %** \$;
<1>--------------
5 1 2 4
<2>--------------
fedcba
<3>--------------
1011
<4>--------------
Seq[I575R1C5T:K]:
[1]String[I572R2C3:C]def
[2]Num[I570R1C1:I]3
[3]Num[I568R1C1:I]2
[4]Num[I559R1C1:I]1
[5]String[I557R1C3:C]abc
M ~ Without Default   In development
D ~ Without Given '<1>============'\$;
1 2 3 2 3 1 => n \$;
'<2>============'\$;
n ~ (1 2) \$;
'<3>============'\$;
n @== ~ (1 2) \$;
'<4>============'\$;
'a''b''c''C''A''B' =>t %** \$;
'<5>============'\$;
t ~ ('a''B') %** \$;
'<6>============'\$;
t @== ~ ('a''B') %** \$;
<1>============
1 2 3 2 3 1
<2>============
3 3
<3>============
3 3
<4>============
Seq[I684R2C6T:P]:
[1]String[I681R1C1:C]a
[2]String[I683R1C1:C]b
[3]String[I686R1C1:C]c
[4]String[I688R1C1:C]C
[5]String[I690R1C1:C]A
[6]String[I692R1C1:C]B
<5>============
Seq[I753R1C2T:P]:
[1]String[I686R2C1:C]c
[2]String[I688R2C1:C]C
<6>============
Seq[I803R1C4T:P]:
[1]String[I683R2C1=C]b
[2]String[I686R2C1=C]c
[3]String[I688R2C1=C]C
[4]String[I690R2C1=C]A
M ~~ Without Default Extraneous   In development
M ~~ Without Given Extraneous   In development
M /# Count Each "<1>--------"\$;
5 %% 10?10 => n \$;
"<2>--------"\$;
(n `` (5`) \$) %** \$;
"<3>--------"\$;
(n `` (5`) /# %** \$);
"<4>--------"\$;
(n `` (5`) @& # %** \$);
<1>--------
1 5 4 4 5 5 2 3 3 5
<2>--------
178 93 42 5 6 10
Seq[I733R2C5T:K]:
[1]Num[I736R1C1:I]1
[2]Num[I739R1C1:I]7
[3]Num[I742R1C2:I]8 9
[4]Num[I745R1C2:I]3 4
[5]Num[I748R1C4:I]2 5 6 10
<3>--------
Num[I841R1C5:I]1 1 2 2 4
<4>--------
Seq[I934R1C5T:K]:
[1]Num[I937R1C1:I]1
[2]Num[I940R1C1:I]1
[3]Num[I943R1C1:I]2
[4]Num[I946R1C1:I]2
[5]Num[I949R1C1:I]4