⍝ Fix function/operator rep:

    ⎕io←1

    ⎕fx'z←tfn n' 'z←⍳n'             ⍝ trad fn.

    dfn←{3↑⍵}                       ⍝ dfn.
    drv←×/                          ⍝ derived fn.

    vec←rep¨'tfn' 'dfn' 'drv'
    vec                             ⍝ vector of function reps.
┌──────┬──────┬──────────┐
│ ∇tfn │ ∇dfn │┌───┬────┐│
│      │      ││drv│ ×/ ││
│      │      │└───┴────┘│
└──────┴──────┴──────────┘

      ⊢fix¨vec                      ⍝ fix functions.
┌───┬───┬───┐
│tfn│dfn│drv│
└───┴───┴───┘

      ⎕cr¨'drv' 'dfn' 'tfn'         ⍝ function 'source'.
┌──┬─────────┬───────┐
│×/│dfn←{3↑⍵}│z←tfn n│
│  │         │z←⍳n   │
└──┴─────────┴───────┘

      drv dfn tfn 6                 ⍝ test functions.
6

⍝∇ fix rep

Back to: code

Back to: Workspaces