inslink←{                               ⍝ Insert edge ⍵ in graph ⍺.
    graph←⍺ ⋄ fm to←⍵                   ⍝ graph and edge.
    {graph}(fm⊃graph)←(fm⊃graph)∪to     ⍝ overwrite vertex with new edge.
}

test script

Back to: notes

Back to: Workspaces

Trouble seeing APL font?