| Exercise 2 | Index << >> |
|
Write 1-line models of the extended ∊ ~ ∩ ∪ in terms of the extended ⍳ .
member ← {(≢⍵)>⍵⍳⍺}
unique ← {⍵ ⌿⍨ (⍳≢⍵)=⍵⍳⍵}
without ← {⍺ ⌿⍨ ~(⍺⍳⍺)∊,⍺⍳⍵}
intersect ← {⍺ ⌿⍨ (⍺⍳⍺)∊,⍺⍳⍵}
union ← {⍺⍪(↑,⊂⍤(¯1+⍴⍴⍺)⊢⍵) without ⍺}
|