aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xchallenge-252/robbie-hatley/perl/ch-2.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-252/robbie-hatley/perl/ch-2.pl b/challenge-252/robbie-hatley/perl/ch-2.pl
index 119ba7629e..4edb5e4b68 100755
--- a/challenge-252/robbie-hatley/perl/ch-2.pl
+++ b/challenge-252/robbie-hatley/perl/ch-2.pl
@@ -77,8 +77,8 @@ sub is_pos_int ($x) {
return $x =~ m/^[1-9]\d*$/;
}
+# Return array of unique ints adding to $n:
sub usz ($n) {
- return ('$n not pos int') if !is_pos_int($n);
my @a = ();
push @a, -int($n/2)..-1;
1 == $n%2 and push @a, 0;