On Wed, Jun 25, 2008 at 12:49:35PM -0500, Patrick R. Michaud wrote: > On Tue, Jun 24, 2008 at 02:27:04PM -0500, [EMAIL PROTECTED] wrote: > > : =item rand > > : > > : our Num method rand ( Num $x: ) > > : our Num term:<rand> > > : > > : Pseudo random number in range C<< 0 ..^ $x >>. That is, C<0> is > > : theoretically possible, while C<$x> is not. The C<rand> function > > : is 0-ary and always produces a number from C<0..^1>. > > > > Hmm, I'd've thought that meant that 'rand' takes no params and returns > > 0..^1 but rand( Num $x: ) returns 0 .. ^$x but > > The first rand is a method on the Num type. Since it's not specified > as "is export", it remains strictly a method and doesn't supply a > multisub form. > [...] > Correct, we haven't implemented .pick on Range objects yet. I'm not > sure if we should have a separate .pick method for Range, or if List > actually needs to be a role, or if there's some other role common to > List and Range that should be providing .pick and other similar > methods.
Larry++ just reminded me on #perl6 that .pick (and .rand) are now methods on Any (see the bottom paragraph of [1]), so once Rakudo moves its methods over to Any then things will work quite a bit better. Thanks! Pm [1] http://groups.google.com/group/perl.perl6.compiler/msg/acf1cfbb16b998cf