aboutsummaryrefslogtreecommitdiff
path: root/challenge-104
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-104')
-rwxr-xr-xchallenge-104/jo-37/perl/ch-1.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/challenge-104/jo-37/perl/ch-1.pl b/challenge-104/jo-37/perl/ch-1.pl
index c06ed04f32..1b33496b62 100755
--- a/challenge-104/jo-37/perl/ch-1.pl
+++ b/challenge-104/jo-37/perl/ch-1.pl
@@ -48,6 +48,8 @@ if ($fusc) {
# Non-recursive implementation of fusc according to
# http://oeis.org/A002487
sub fusc ($n) {
+ # Interestingly, without the modulus this would produce the
+ # respective Fibonacci number.
reduce {$a += $b % 2} 0, map binomial($_, $n - $_ - 1),
ceil(($n - 1) / 2) .. $n - 1;
}