⍝ Rotate_with_axis.tc
⍝ ----------------------------------

      ⎕IO←1 ⍝ for proper axis

      A←'BETTA' 'CARP' 'EEL' 'LOACH'
      B←'BAY' 'CEDAR' 'ELM' 'LARCH'
      C←3 4 1ρA,B,'BOA' 'CAVY' 'ELAND' 'LION'
      C
 BETTA 
 CARP  
 EEL   
 LOACH 

 BAY   
 CEDAR 
 ELM   
 LARCH 

 BOA   
 CAVY  
 ELAND 
 LION  

      1⌽[1]C
 BAY   
 CEDAR 
 ELM   
 LARCH 

 BOA   
 CAVY  
 ELAND 
 LION  

 BETTA 
 CARP  
 EEL   
 LOACH 

⍝ ⊖ is the same as ⌽[1] ----------------------------------

      1⊖C
 BAY   
 CEDAR 
 ELM   
 LARCH 

 BOA   
 CAVY  
 ELAND 
 LION  

 BETTA 
 CARP  
 EEL   
 LOACH 

      1⌽[2]C
 CARP  
 EEL   
 LOACH 
 BETTA 

 CEDAR 
 ELM   
 LARCH 
 BAY   

 CAVY  
 ELAND 
 LION  
 BOA   


      U←3 1ρ'ALFRED' 'THINK' 'QUICK'
      U
 ALFRED 
 THINK  
 QUICK  

      1⊖U
 THINK  
 QUICK  
 ALFRED 

      ¯1⊖U
 QUICK  
 ALFRED 
 THINK  

⍝ 1 < ⍴,L ----------------------------------

      W←'abcdefghijklmnopqrst'
      W←W,(ι20)
      W←3 4 5ρW,'ABCDEFGHIJKLMNOPQRST'
      W
 a  b  c  d  e
 f  g  h  i  j
 k  l  m  n  o
 p  q  r  s  t

 1  2  3  4  5
 6  7  8  9 10
11 12 13 14 15
16 17 18 19 20

 A  B  C  D  E
 F  G  H  I  J
 K  L  M  N  O
 P  Q  R  S  T

      ρW
3 4 5

      V←3 5ρ0 1 ¯1 2 ¯2 ¯3 ¯1 1 3 0 1 0 2 ¯1 3
      V
 0  1 ¯1  2 ¯2
¯3 ¯1  1  3  0
 1  0  2 ¯1  3

      V⌽[2]W
 a  g  r  n  o
 f  l  c  s  t
 k  q  h  d  e
 p  b  m  i  j

 6 17  8 19  5
11  2 13  4 10
16  7 18  9 15
 1 12  3 14 20

 F  B  M  S  T
 K  G  R  D  E
 P  L  C  I  J
 A  Q  H  N  O

⍝ selective spec ----------------------------------

      Y←3 4ρι12
      (1 ¯1 2 ¯2⌽[1]Y)←3 4ρ'ABCDEFGHIJKL'
      Y
IFGL
AJKD
EBCH

⍝ ==================================

