aboutsummaryrefslogtreecommitdiff
path: root/challenge-173
diff options
context:
space:
mode:
authorWalt Mankowski <waltman-github@mawode.com>2022-07-15 21:17:16 -0400
committerGitHub <noreply@github.com>2022-07-15 21:17:16 -0400
commit4e2d62b030546c9c04c8b9f355adff3cc0182d09 (patch)
tree48c7d1951be1228a9054a7e23b97872bd7c4622e /challenge-173
parentc04831d7a245601dae441b8cd2993e1cc8c999cb (diff)
downloadperlweeklychallenge-club-4e2d62b030546c9c04c8b9f355adff3cc0182d09.tar.gz
perlweeklychallenge-club-4e2d62b030546c9c04c8b9f355adff3cc0182d09.tar.bz2
perlweeklychallenge-club-4e2d62b030546c9c04c8b9f355adff3cc0182d09.zip
fixed link syntax
Diffstat (limited to 'challenge-173')
-rw-r--r--challenge-173/walt-mankowski/README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-173/walt-mankowski/README.md b/challenge-173/walt-mankowski/README.md
index 7a5af58509..b9e53c1a92 100644
--- a/challenge-173/walt-mankowski/README.md
+++ b/challenge-173/walt-mankowski/README.md
@@ -20,7 +20,7 @@ sub is_esthetic($n) {
## Task 2: Sylvester's Sequence
-For this task we need to generate the first 10 terms of (Sylvester's Sequence)[https://en.wikipedia.org/wiki/Sylvester%27s_sequence]. **Sylvester's Sequence** is an integer sequence where every term is the product of all the previous terms, plus one.
+For this task we need to generate the first 10 terms of [Sylvester's Sequence](https://en.wikipedia.org/wiki/Sylvester%27s_sequence). **Sylvester's Sequence** is an integer sequence where every term is the product of all the previous terms, plus one.
Terms in Sylvester's Sequence get very large very fast (the 10th term has 20 digits) so we need to use the `bigint` module. I also used the `prod` function from `List::Util` to do the multiplication. With those modules in hand, we can solve this challenge in just a few lines of code:
@@ -31,4 +31,4 @@ use List::Util qw(product);
my @sylvester;
push @sylvester, 1 + product @sylvester while @sylvester < 10;
say for @sylvester;
-``` \ No newline at end of file
+```