| Exercise: Inverted Table Index-Of | Index << >> |
invert← {↑¨↓⍉⍵}
vert ← {⍉↑⊂⍤¯1¨⍵}
u0←'fourscore' 'and' 'ten' 'years' 'ago'
u1←'abc'
u2←'USA' 'UK' 'China' 'Canada' 'Italy' 'Denmark'
u3←?20⍴100
u←u0[?30⍴≢u0],u1[?30⍴≢u1],u2[?30⍴≢u2],⍪u3[?30⍴≢u3]
x←invert tx←u[?30⍴≢u;]
y←invert ty←u[?23⍴≢u;]
|