Subject: | interface improvement |
It should be simpler to get the factors of a single number. This seems like a more common need, and multiple factors could be defined in terms of it.
@factors = factors(9);
%factors = map { $_ => factors($_) } qw(9 10 11 12);