You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
301 B

Dict⇐{D mat:
{
Get⇐{ G key:
k‿v← <˘⍉ mat # [k]eys and [v]alues of mat
i ←⊑ k ⊐ <key # [i]ndex of key
"Key not found" ! i<≠k
r←i ⊑ v # [r]esult
(0‿1∨´∘∊≍≡r)◶{D>𝕩}‿⊢ r # return (D r) if r is matrix
}
}
}