On Thu, 26 Nov 2015, Elizabeth Mattijsen via RT wrote:

(0.1 .. 0.3).roll(10).say;

What did you expect?  a selection of 0.1, 0.2, 0.3 ??  or 10 random values 
between 0.1 and 0.3 inclusive?

I would (naive) expect 10x a value between 0.1 and 0.3 . Analog to:

(0.1, 0.2, 0.3).roll(10).say;
# OUTPUT«(0.3 0.2 0.1 0.2 0.1 0.2 0.3 0.2 0.2 0.1)␤»

However, S03 is quite clear how Range is iterating.

0.1.succ == 1.1;

So incrementing by 0.1 can't work. It may be reasonable to fail as early as possible for Range.roll on any Range that is neither Int nor Str on both end points.

mfgwp

Reply via email to