Factors of an integer

sub factors (Int $n) { (1..$n).grep($n %% *) }

Last updated