dlb←{                                           ⍝ Drop Leading Blanks.
    ⍺←' ' ⋄ 1<|≡⍵:(⊂⍺)∇¨⍵                       ⍝ nested?
    2<⍴⍴⍵:(¯1↓⍴⍵){(⍺,1↓⍴⍵)⍴⍵}⍺ ∇,[¯1↓⍳⍴⍴⍵]⍵     ⍝ array
    1≥⍴⍴⍵:(+/∧\⍵∊⍺)↓⍵                           ⍝ vector
    (∨\∨⌿~⍵∊⍺)/⍵                                ⍝ matrix
}
code_colours

test script

Back to: notes

Back to: Workspaces