Most programming languages have a built-in implementation of exponentiation for integers and reals only.



Task

Demonstrate how to implement matrix exponentiation as an operator.




MatMul ← +˝∘×⎉1‿∞
 
MatEx ← {𝕨 MatMul⍟(𝕩-1) 𝕨}
 
(>⟨3‿2
   2‿1⟩) MatEx 1‿2‿3‿4‿10