⍝ Logical function array:

    0 0 1 1  {0}logic 0 1 0 1     ⍝  0    0
0 0 0 0
    0 0 1 1  {1}logic 0 1 0 1     ⍝  1    ∧
0 0 0 1
    0 0 1 1  {2}logic 0 1 0 1     ⍝  2    >
0 0 1 0
    0 0 1 1  {3}logic 0 1 0 1     ⍝  3    ⍺
0 0 1 1
    0 0 1 1  {4}logic 0 1 0 1     ⍝  4    <
0 1 0 0
    0 0 1 1  {5}logic 0 1 0 1     ⍝  5    ⍵
0 1 0 1
    0 0 1 1  {6}logic 0 1 0 1     ⍝  6    ≠
0 1 1 0
    0 0 1 1  {7}logic 0 1 0 1     ⍝  7    ∨
0 1 1 1
    0 0 1 1  {8}logic 0 1 0 1     ⍝  8    ⍱
1 0 0 0
    0 0 1 1  {9}logic 0 1 0 1     ⍝  9    =
1 0 0 1
    0 0 1 1 {10}logic 0 1 0 1     ⍝ 10   ~⍵
1 0 1 0
    0 0 1 1 {11}logic 0 1 0 1     ⍝ 11    ≥
1 0 1 1
    0 0 1 1 {12}logic 0 1 0 1     ⍝ 12   ~⍺
1 1 0 0
    0 0 1 1 {13}logic 0 1 0 1     ⍝ 13    ≤
1 1 0 1
    0 0 1 1 {14}logic 0 1 0 1     ⍝ 14    ⍲
1 1 1 0
    0 0 1 1 {15}logic 0 1 0 1     ⍝ 15    1
1 1 1 1

    l n r←(3 4⍴0 0 1 1)(⍉4 3⍴6 11 13)(3 4⍴0 1 0 1)
    l n r
┌───────┬───────────┬───────┐
│0 0 1 1│ 6  6  6  6│0 1 0 1│
│0 0 1 1│11 11 11 11│0 1 0 1│
│0 0 1 1│13 13 13 13│0 1 0 1│
└───────┴───────────┴───────┘

    l,'≠≥≤',r,'→',l{n}logic r       ⍝ apply functions in parallel
0 0 1 1 ≠ 0 1 0 1 → 0 1 1 0
0 0 1 1 ≥ 0 1 0 1 → 1 0 1 1
0 0 1 1 ≤ 0 1 0 1 → 1 1 0 1

⍝∇ logic

Back to: code

Back to: Workspaces