aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Lynn <bizlsg@localhost.localdomain>2023-06-08 02:00:04 +0800
committerStephen Lynn <bizlsg@localhost.localdomain>2023-06-08 02:00:04 +0800
commitbcc5ed65920a39ad387714f12fa8ede117d249ca (patch)
treea9de5b804c22f634eca3764663487870fcce04ff
parentbbd71ad749ca5dd0e81a0a5e0a156017b2083338 (diff)
downloadperlweeklychallenge-club-bcc5ed65920a39ad387714f12fa8ede117d249ca.tar.gz
perlweeklychallenge-club-bcc5ed65920a39ad387714f12fa8ede117d249ca.tar.bz2
perlweeklychallenge-club-bcc5ed65920a39ad387714f12fa8ede117d249ca.zip
ch-2.p6 tune
-rwxr-xr-xchallenge-220/steve-g-lynn/raku/ch-2.p62
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-220/steve-g-lynn/raku/ch-2.p6 b/challenge-220/steve-g-lynn/raku/ch-2.p6
index edeea0a7ac..460d8e1204 100755
--- a/challenge-220/steve-g-lynn/raku/ch-2.p6
+++ b/challenge-220/steve-g-lynn/raku/ch-2.p6
@@ -9,7 +9,7 @@ multi sub is_perfect_square( @ints ) {
}
sub squareful (@ints where @ints.elems==3) {
- @ints.permutations.grep( {$_.&is_perfect_square} ).unique( :with(&[eqv]) );
+ @ints.permutations.unique( :with(&[eqv]) ).grep( {$_.&is_perfect_square} );
}
say &squareful((1,17,8)); #(1,8,17),(17,8,1)