aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2021-01-21 22:34:14 +0000
committerGitHub <noreply@github.com>2021-01-21 22:34:14 +0000
commite76d32c7efe70f4b68bdb7972505445d30300aed (patch)
treebe11434d36efb42c111f10b374fed20109ea4f23
parent8b848c47aa3e33b253684ee1635df920068c2369 (diff)
parent9475d17b170ff168f63087aa0e9029bcac785649 (diff)
downloadperlweeklychallenge-club-e76d32c7efe70f4b68bdb7972505445d30300aed.tar.gz
perlweeklychallenge-club-e76d32c7efe70f4b68bdb7972505445d30300aed.tar.bz2
perlweeklychallenge-club-e76d32c7efe70f4b68bdb7972505445d30300aed.zip
Merge pull request #3337 from pauloscustodio/update_017
Add Memoize to cache results of recursive calls
-rw-r--r--challenge-017/paulo-custodio/perl/ch-1.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/challenge-017/paulo-custodio/perl/ch-1.pl b/challenge-017/paulo-custodio/perl/ch-1.pl
index 34eb3335a6..8c61031099 100644
--- a/challenge-017/paulo-custodio/perl/ch-1.pl
+++ b/challenge-017/paulo-custodio/perl/ch-1.pl
@@ -23,6 +23,9 @@ use strict;
use warnings;
use 5.030;
+use Memoize;
+memoize 'A';
+
sub A {
no warnings 'recursion';
my($m, $n) = @_;