diff options
| author | Paulo Custodio <pauloscustodio@gmail.com> | 2021-01-21 21:09:41 +0000 |
|---|---|---|
| committer | Paulo Custodio <pauloscustodio@gmail.com> | 2021-01-21 21:09:41 +0000 |
| commit | 9475d17b170ff168f63087aa0e9029bcac785649 (patch) | |
| tree | d124628d7fc3837db3186c08da5c093b34576d4a /challenge-017 | |
| parent | 63c0d699561885257c762e0e04c1a4e6ac3e4212 (diff) | |
| download | perlweeklychallenge-club-9475d17b170ff168f63087aa0e9029bcac785649.tar.gz perlweeklychallenge-club-9475d17b170ff168f63087aa0e9029bcac785649.tar.bz2 perlweeklychallenge-club-9475d17b170ff168f63087aa0e9029bcac785649.zip | |
Add Memoize to cache results of recursive calls
Diffstat (limited to 'challenge-017')
| -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) = @_; |
