On 01 Jan 2003 21:54:25 -0800, [EMAIL PROTECTED] (Randal L. Schwartz) wrote:
> >>>>> "Philip" == Philip Newton <[EMAIL PROTECTED]> writes:
>
> Philip> You're not allowed to compare numbers? That will make it difficult to
> Philip> find out when the list is sorted.
>
> use ESP::Psychic qw(infer_sortedness);
Ah! Easy, then.
use ESP::Psychic qw(infer_sortedness);
sub bogosort {
do {
rotate_sequential (start => rand($#_ - 3));
} while(! infer_sortedness);
}
Cheers,
Philip
