On Mon, Jul 12, 2004 at 10:12:03AM -0700, Austin Hastings wrote: : --- Dave Whipp <[EMAIL PROTECTED]> wrote: : : > rand(@x) == @x.rand == @x[ rand int @x ] == @x[ rand(1) * @x ] : > : > guaranteeing a uniform distribution unless adverbial modifiers are : > used.
The hard part being to pick a random number in [0,Inf) uniformly. :-) : Meaning I can do: : : $avg_joe = rand @students :bell_curve; : : ? Certainly you can do that, but it'll only work if some version of rand declares either a ?$bell_curve option or a +$bell_curve option. (And the latter will work only if we can extend multiple dispatch to pay attention to named parameters, which we've explicitly put into the category of things the Parrot folks are allowed to ignore for 6.0.0.) Larry