aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrbaggy <js5@sanger.ac.uk>2022-02-21 13:14:43 +0000
committerdrbaggy <js5@sanger.ac.uk>2022-02-21 13:14:43 +0000
commitf18aa90001a4e642af2eb49083f1145ae6b32f5d (patch)
tree7d23551cd00690835b05f36e0beb146fc0435076
parent288057989ae51d735f24d2d9bcd0f2c1ce09e032 (diff)
downloadperlweeklychallenge-club-f18aa90001a4e642af2eb49083f1145ae6b32f5d.tar.gz
perlweeklychallenge-club-f18aa90001a4e642af2eb49083f1145ae6b32f5d.tar.bz2
perlweeklychallenge-club-f18aa90001a4e642af2eb49083f1145ae6b32f5d.zip
pushing changes
-rw-r--r--challenge-153/james-smith/perl/ch-2.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/challenge-153/james-smith/perl/ch-2.pl b/challenge-153/james-smith/perl/ch-2.pl
index d6d22cedb6..335eba64fc 100644
--- a/challenge-153/james-smith/perl/ch-2.pl
+++ b/challenge-153/james-smith/perl/ch-2.pl
@@ -12,12 +12,12 @@ my @FACT = (1);
push @FACT, $_*$FACT[-1] foreach 1..9;
my @TESTS = ( [ 145, 1 ], [ 125, 0 ], );
-is( factorion($_->[0]), $_->[1] ) foreach @TESTS;
+is( is_factorion($_->[0]), $_->[1] ) foreach @TESTS;
done_testing();
-factorion($_) && say for 1 .. 2_177_282;
+is_factorion($_) && say for 1 .. 2_177_282;
-sub factorion {
+sub is_factorion {
my $t=0;
$t+=$FACT[$_] for split //,$_[0];
$t==$_[0];