⍝ Insert vertex ⍵ in graph ⍺:
a←(2 3)(3)(2 4)(1 5)(3) ⍝ graph "a".
disp a
┌→──┬─┬───┬───┬─┐
│2 3│3│2 4│1 5│3│
└~─→┴─┴~─→┴~─→┴─┘
disp a insnode 10 ⍝ ... with new node 10.
┌→──┬─┬───┬───┬─┬─┬─┬─┬─┬─┐
│2 3│3│2 4│1 5│3│0│0│0│0│0│
└~─→┴─┴~─→┴~─→┴─┴⊖┴⊖┴⊖┴⊖┴⊖┘
Back to: code
Back to: Workspaces
Trouble seeing APL font?