| Next | You can't get there from here | 23 |
Sometimes it is really hard to tell:
sub do_i_finish_or_not_huh { # actually nobody knows
my $arg = shift;
until ($arg == 1) {
if ($arg % 2 == 0) { $arg /= 2 }
else { $arg = $arg * 3 + 1 }
}
return 1;
}
| Next | ![]() |
Copyright © 2005 M. J. Dominus |