Stream Index Operators(work in progress)

KEY:
D: Dyadic; M: Monadic; N: Niladic

Commentary     Op Code Result
Commentary M `<- Take for first LN 13 10#asc =>nl;
'<1>-----------' $;
'now',nl,'and',nl,'then' =>str :hex $;
'<2>-----------' $;
str <- (str `<-) :hex $;
<1>-----------
now..and..then
66700666007666
EF7DA1E4DA485E
<2>-----------
now..
66700
EF7DA
Commentary D `<- Take for first n LNs 13 10#asc =>nl;
'<1>-----------' $;
'now',nl,'and',nl,'then' =>str :hex $;
'<2>-----------' $;
str <- (str `<- 2) :hex $; 
<1>-----------
now..and..then
66700666007666
EF7DA1E4DA485E
<2>-----------
now..and..
6670066600
EF7DA1E4DA
Commentary M `-> Take for last LN 13 10#asc =>nl;
'<1>-----------' $;
'now',nl,'and',nl,'then' =>str :hex $;
'<2>-----------' $;
str -> (str `->) :hex $;
<1>-----------
now..and..then
66700666007666
EF7DA1E4DA485E
<2>-----------
..then
007666
DA485E
Commentary D `-> Take for last n LNs 13 10#asc =>nl;
'<1>-----------' $;
'now',nl,'and',nl,'then' =>str :hex $;
'<2>-----------' $;
str -> (str `-> 2) :hex $;
<1>-----------
now..and..then
66700666007666
EF7DA1E4DA485E
<2>-----------
..and..then
00666007666
DA1E4DA485E
Commentary D `<-| Take for first any 'now,and.then' =>str;
'<1> ' (str <- (str `<-| ',' ) )$;
'<2> ' (str <- (str `<-| '.' ) )$;
'<3> ' (str <- (str `<-| '.,') )$;
'<4> ' (str <- (str `<-| 'x') )$;
<1> now,
<2> now,and.
<3> now,
<4> now,and.then
Commentary D `->| Take for last any 'now,and.then' =>str;
'<1> ' (str -> (str `->| ',') )$;
'<2> ' (str -> (str `->| '.' ) )$;
'<3> ' (str -> (str `->| '.,') )$;
'<4> ' (str -> (str `->| 'x') )$;
<1> ,and.then
<2> .then
<3> .then
<4> now,and.then
Commentary D `<-& Take for first all 'now,and.then' =>str;
'<1> ' (str <- (str `<-& 'Now') )$;
'<2> ' (str <- (str `<-& 'And' ) )$;
'<3> ' (str <- (str @== `<-& 'And') )$;
'<4> ' (str <- (str @== `<-& 'and') )$;
<1>
<2> now,
<3> now,and.then
<4> now,
Commentary D `->& Take for last all 'now,and.then' =>str;
'<1> ' (str -> (str `->& 'Now') )$;
'<2> ' (str -> (str `->& 'And' ) )$;
'<3> ' (str -> (str @== `->& 'And') )$;
'<4> ' (str -> (str @== `->& 'and') )$;
<1> ,and.then
<2> .then
<3> now,and.then
<4> .then
Commentary M `->> Index of next line 13 10#asc => n; 'now',n,'is',n,'the',n,'time'=>s;
1..(s#)%10 %* ~ $;s :hex $;
'<1>----- '$;
s ->> (s `->> ) :hex $;
'<2>----- '$;
s ->> (s `->> 2) :hex $;
'<3>----- '$;
s ->> (s `->> 2) :hex $;
123456789012345678
now..is..the..time
667006700766007666
EF7DA93DA485DA49D5
<1>-----
now..
66700
EF7DA
<2>-----
is..the..
670076600
93DA485DA
<3>-----
time
7666
49D5
Commentary M `<<- Index of prev line 13 10#asc => n;
'now',n,'is',n,'the',n,'time'=>s;
1..(s#)%10 %* ~ $;s :hex $;s @->;
'<1>----- '$;
s <<- (s `<<- ) :hex $;
'<2>----- '$;
s <<- (s `<<- 2) :hex $;
'<3>----- '$;
s <<- (s `<<- 2) :hex $;
123456789012345678
now..is..the..time
667006700766007666
EF7DA93DA485DA49D5
<1>-----
..time
007666
DA49D5
<2>-----
..is..the
006700766
DA93DA485
<3>-----
now
667
EF7
  D `->> n Index of next nth line See previous examples See previous example
  D `<<- n Index of nth prev line See previous examples See previous example
Commentary D `->>| Index of next any 'now,and.then;'=>str; str $;
1..(str#)%10 %* ~ $;
'<1> ' (str `->>| ";" ) $;
'<2> ' (str `->>| ".") $;
'<3> ' (str `->>| ",.;" ) $;
'<4> ' ( str @<- 6; str ?`@)' '
  (str `->>| ",.;" ) $;
now,and.then;
1234567890123
<1> 13
<2> 8
<3> 4
<4> 6 8
Commentary D `<<-| Index of prev any 'now,and.then;'=>str; str $;
1..(str#)%10 %* ~ $;
'<1> ' (str @->;str ?`@)' '
  (str `<<-| "," ) $;
'<2> ' (str `<<-| ".") $;
'<3> ' (str `<<-| ",.;" ) $;
'<4> ' ( str @-> 7; str ?`@)' '
  (str `<<-| ",.;" ) $; 
now,and.then;
1234567890123
<1> 14 4
<2> 8
<3> 13
<4> 7 4
Commentary D `->>& Index of next all 'now,and.then;'=>str; str $;
1..(str#)%10 %* ~ $;
'<1> ' (str `->>& "and" ) $;
'<2> ' (str `->>& "TH") $;
'<3> ' (str @== `->>& "TH") $;
'<4> ' ( str @<- 6; str ?`@)' '
  (str `->>& "n" ) $;
now,and.then;
1234567890123
<1> 4
<2> 8
<3> 13
<4> 6 6
Commentary D `<<-& Index of prev all 'now,and.then;'=>str; str $;
1..(str#)%10 %* ~ $; str @->;
'<1> ' (str `<<-& "and" ) $;
'<2> ' (str `<<-& "TH") $;
'<3> ' (str @== `<<-& "TH") $;
'<4> ' ( str @-> 3; str ?`@)' '
  (str `<<-& "n" ) $;
now,and.then;
1234567890123
<1> 6
<2> 3
<3> 13
<4> 11 5