refmatch←{⎕ML←1                             ⍝ Space reference match.
    ⍺ ⍵{                                    ⍝ ⍺: vectors of visited refs
        =/⍵:1                               ⍝ identical refs: yes
        ≢/⍵.(⎕NL 2 3 4 9):0                 ⍝ content lists differ: no
        ≢/⍵.(⍎¨'0',↓⎕NL 2):0                ⍝ variables differ: no
        ≢/⍵.⍎⊂'⎕ct⎕div⎕io⎕ml⎕pp⎕rl⎕rtl':0   ⍝ sys vars differ: no
        ≢/⍵.(⎕CR¨↓⎕NL 3 4):0                ⍝ function source differs: no
        ⍬ ⍬≡refs←⍵.(1↓⍎¨'0',↓⎕NL 9):1       ⍝ subspaces per ref else stop
        ∨/⍺∊∊refs:1                         ⍝ cycle: ignore and stop
        ∧/(⍺,∊refs)∘∇¨↓⍉↑refs               ⍝ compare subspaces
    }⍺ ⍵                                    ⍝ ⍵: pair of refs to be searched
}

code_colours

test script

Back to: notes

Back to: Workspaces