diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2021-01-21 22:34:14 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-21 22:34:14 +0000 |
| commit | e76d32c7efe70f4b68bdb7972505445d30300aed (patch) | |
| tree | be11434d36efb42c111f10b374fed20109ea4f23 | |
| parent | 8b848c47aa3e33b253684ee1635df920068c2369 (diff) | |
| parent | 9475d17b170ff168f63087aa0e9029bcac785649 (diff) | |
| download | perlweeklychallenge-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.pl | 3 |
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) = @_; |
