aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Neleigh <matthew.neleigh@gmail.com>2023-01-22 11:24:19 -0500
committerMatthew Neleigh <matthew.neleigh@gmail.com>2023-01-22 11:24:19 -0500
commitac4aa90af41de331a9f7a7884743e1f8c17b4bfa (patch)
tree224b1b64714914be95aae4b4889687bf91f1997a
parent9576611704a06fce945925327ce1db9798cb51b1 (diff)
downloadperlweeklychallenge-club-ac4aa90af41de331a9f7a7884743e1f8c17b4bfa.tar.gz
perlweeklychallenge-club-ac4aa90af41de331a9f7a7884743e1f8c17b4bfa.tar.bz2
perlweeklychallenge-club-ac4aa90af41de331a9f7a7884743e1f8c17b4bfa.zip
modified: challenge-200/mattneleigh/perl/ch-1.pl
-rwxr-xr-xchallenge-200/mattneleigh/perl/ch-1.pl10
1 files changed, 6 insertions, 4 deletions
diff --git a/challenge-200/mattneleigh/perl/ch-1.pl b/challenge-200/mattneleigh/perl/ch-1.pl
index 24141ed0b8..fd552bb891 100755
--- a/challenge-200/mattneleigh/perl/ch-1.pl
+++ b/challenge-200/mattneleigh/perl/ch-1.pl
@@ -57,10 +57,12 @@ exit(0);
# * The array to examine (e.g. ( 1, 2, 3, 4, 8, 6, 4 ) )
# Returns on success:
# * A list of refs to arrays that represent the arithmetic slices found within
-# the array (e.g. ( [ 1, 2, 3 ], [ 1, 2, 3, 4 ], [ 2, 3, 4 ], [ 8, 6, 4 ] )
-# NOTE: If no arithmetic slices are found, OR if the input array has fewer than
-# three members (by definition there cannot be an arithmetic slice in an array
-# of one or two numbers) then the returned list will be empty
+# the array (e.g. ( [ 1, 2, 3 ], [ 1, 2, 3, 4 ], [ 2, 3, 4 ], [ 8, 6, 4 ] );
+# if no arithmetic slices are found, OR if the input array has fewer than
+# three members (by definition there cannot be an arithmetic slice in an
+# array of one or two numbers) then the returned list will be empty
+# NOTE: Although it is not shown in the example above, zero (0) is considered a
+# valid difference for determining which slices are arithmetic
################################################################################
sub find_arithmetic_slices{