Exercise 18 Index   <<   >>


 

Write a model of f⌸ .




























 Key←{
  0=⎕nc'⍺':⍵ ∇ ⍳≢⍵
  j←⍋i←⍳⍨⍺
  ↑ (⊂⍤¯1⊢⍺⌿⍨(⍳≢i)=⍳⍨i) ⍺⍺¨ (2≠/¯1,i[j]) ⊂[0] ⍵⌷⍨⊂j
 }


_____________________

   a
Carlo
John 
John 
Diane
Roger
Lisa 

   (∨/a='o') {⊂⍵}Key a
┌─────┬─────┐
│Carlo│Diane│
│John │Lisa │
│John │     │
│Roger│     │
└─────┴─────┘