On 22 March 2012 11:02, Carl Mäsak <cma...@gmail.com> wrote: >>> 1, 2, 4 ... 100 # same as 1,2,4,8,16,32,64 >> >> That last one doesn't work on Rakudo :-( > > And it never will. Note that 100 is not a power of 2, and that the > goal needs to match exactly. This is because smartmatching is used, ... > If you're wondering why things are factored in this way, it's because > previous versions of the spec that tried to special-case 100 to work > in cases like the above, ended up not working out. It turned out that > the unification of infix:<...> and smartmatching was what did work. It > has the slight drawback that we have to educate users to write * >= > 100 instead of 100 in the case of not-exactly-matching goal states. > But it's still a net win, because this unified semantics works better > than anything we had before.
But that's a bit of a problem if I *don't* want a value higher than 100. > 2,4,8... * >= 100 2 4 8 16 32 64 128 There is no simple formula I can use at the end to get the sequence to stop where I want. So I have to do something like: my @a = 2,4,8... * >= 100; @a.pop # Use @a Cheers, Daniel. -- I'm not overweight, I'm undertall.