tnest←{⎕ML←1                ⍝ Array from TreeView style tree.
    dvec ivec←⍵             ⍝ depth and items vectors.
    1=≢dvec:⊃ivec           ⍝ atom: leaf value.
    node←1↑ivec             ⍝ tree: node value.
    dsub isub(1=dvec)∘⊂¨⍵  ⍝ sub treeviews.
    node,∇¨↓⍉↑(dsub-1)isub  ⍝ joined nested subtrees.
}

code_colours

test script

Back to: notes

Back to: Workspaces