That is terribly confusing. I'm tempted to argue for .pick not being defined on scalar values.
Do any of the other non-Enumerated types besides Bool have a finite range? I'd say .pick should return an appropriate random value when applied to any such. On Monday, June 28, 2010, Patrick R. Michaud via RT <perl6-bugs-follo...@perl.org> wrote: > On Mon Jun 28 04:49:23 2010, lemb...@wrkhors.com wrote: >> Using the June release: >> >> $ perl6 --version >> This compiler is built with the Parrot Compiler Toolkit, parrot >> revision 47640. >> >> Attempting to print some random numers via Bool.pick >> gives no output: > > For a wide variety of reasons, Rakudo currently implements Bool as a > fundamental type rather than an enumeration. As such, Bool.pick is > acting the same as if one had written "Int.pick" or "Num.pick" -- it's > treating the invocant as a list of one element and then returning the > type object directly. And Bool as a type object always returns false > because it is undefined. > > For now, the workaround is to do (False,True).pick until we can properly > implement .pick on enumerations, and figure out how to turn Bool into > one (or convince the specification that Bool is not really an > enumeration :-). > > Pm > -- Mark J. Reed <markjr...@gmail.com>