Matrix multiplication: Difference between revisions

Content added Content deleted
(→‎{{header|Raku}}: last version is not really more concise, rather more functional. + style code tweak)
(→‎{{header|Raku}}: use cross meta-operator in last version)
Line 5,587: Line 5,587:


<syntaxhighlight lang="raku" line>sub infix:<·> { [+] @^a Z* @^b }
<syntaxhighlight lang="raku" line>sub infix:<·> { [+] @^a Z* @^b }
sub infix:<×>(@A, @B) {
sub infix:<×>(@A, @B) { (@A X· [Z] @B).rotor(@B) }
</syntaxhighlight>
cross(@A, ([Z] @B), with => &[·])
.rotor(@B);
}</syntaxhighlight>


=={{header|Rascal}}==
=={{header|Rascal}}==