RosettaCodeData/Task/Matrix-exponentiation-operator/K/matrix-exponentiation-operator.k
2023-07-01 13:44:08 -04:00

3 lines
95 B
Text

/Matrix Exponentiation
/mpow.k
pow: {:[0=y; :({a=/:a:!x}(#x))];a: x; do[y-1; a: x _mul a]; :a}