Determinant and permanent: Difference between revisions

→‎{{header|Raku}}: Fix up some internal links
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
(→‎{{header|Raku}}: Fix up some internal links)
Line 1,895:
(formerly Perl 6)
{{works with|Rakudo|2015.12}}
Uses the permutations generator from the [[Permutations by swapping#Perl_6Raku|Permutations by swapping]] task. This implementation is naive and brute-force (slow) but exact.
 
<lang perl6>sub insert ($x, @xs) { ([flat @xs[0 ..^ $_], $x, @xs[$_ .. *]] for 0 .. @xs) }
10,327

edits