Jump to content

Jordan-Pólya numbers: Difference between revisions

m
→‎{{header|Raku}}: simplify with 'splice'
m (Minor alteration.)
m (→‎{{header|Raku}}: simplify with 'splice')
Line 1,536:
my \p = @res.keys.first: { @res[$_] >= kl } # performance
if p < @res.elems and @res[p] != kl {
@res.splice: = |@res[^p], kl0, |@res[p..*] kl
} elsif p == @res.elems {
@res.append: kl
2,392

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.