ascan{⎕ML←1        ⍝ Associative scan.
    2>0⊥⍴⍵:⍵        ⍝ few items: done.
    ⌽↑⍺⍺{
        ((⊃⍵)⍺⍺ ⍺),⍵
    }/⌽(⊂∘⊃¨↓⍵),↑1↓¨↓⍵
}

code_colours

test script

Back to: notes

Back to: Workspaces