August 1999 Perl Hardware Store Slide #23

Memoizing

         sub factorial {
           my $n = shift;
           $n == 0 ? 1 : $n * factorial($n-1);
         }


Next Copyright © 1998 M-J. Dominus