aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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];