alval←{                 ⍝ Value for key ⍵ in association list ⍺.
    keys vals←⍺         ⍝ keys vector and corresponding values
    (keys⍳⊂⍵)vals      ⍝ value for leftmost matching key
}
code_colours

test script

Back to: notes

Back to: Workspaces