Re: for and ^ question

2020-12-31 Thread ToddAndMargo via perl6-users
^ note: ^3 means the integer "just before" 3 (zero is presume to be the start point) 3^ means the integer "just after" 3 (an ending point is required) On 12/31/20 10:15 PM, Kevin Pye wrote: No, it does not. Go back and read what Brad wrote; he was quite

Re: for and ^ question

2020-12-31 Thread Kevin Pye
> > ^ note: ^3 means the integer "just before" 3 (zero is presume to be the > start point) > > 3^ means the integer "just after" 3 (an ending point is > required) > No, it does not. Go back and read what Brad wrote; he was quite explicit. Nothing about the range 0 ..^ 3 (for which

Re: for and ^ question

2020-12-31 Thread ToddAndMargo via perl6-users
On 12/31/20 1:56 PM, Brad Gilbert wrote: just before Hi Brad, Believe it or not, things fell into place with just those two word from your letter. Excellent! -T

Re: for and ^ question

2020-12-31 Thread ToddAndMargo via perl6-users
On 12/30/20 5:39 PM, ToddAndMargo via perl6-users wrote: Hi All, In the following for loop:     for ^$nCount -> $i { What is the ^ doing? Confused again, -T With wonderful explanations for many others, my notes: ^ note: ^3 means the integer "just before" 3 (zero is presume to be the

Re: for and ^ question

2020-12-31 Thread ToddAndMargo via perl6-users
On 12/31/20 1:56 PM, Brad Gilbert wrote: It does not look like an array from 0 to ($nCount - 1). It only iterates like that. It is a Range object from 0 to $nCount excluding $nCount.     ^9 === Range.new( 0, 9, :excludes-max ) # True     0 ~~ ^9 # True     1 ~~ ^9 # True     0.5 ~~ ^9 #

Re: for and ^ question

2020-12-31 Thread ToddAndMargo via perl6-users
On 12/31/20 7:44 AM, William Michels via perl6-users wrote: There's an open Github issue on the interaction between Seqs and carets: https://github.com/rakudo/rakudo/issues/3881 Scroll down to the section entitled, "EDIT 08/29/2020 -- TL;DR Version" for the crux of the issue. > 8 ... ^16 #

Re: for and ^ question

2020-12-31 Thread Brad Gilbert
It does not look like an array from 0 to ($nCount - 1). It only iterates like that. It is a Range object from 0 to $nCount excluding $nCount. ^9 === Range.new( 0, 9, :excludes-max ) # True 0 ~~ ^9 # True 1 ~~ ^9 # True 0.5 ~~ ^9 # True 8 ~~ ^9 # True 8.9 ~~ ^9 # True

Re: for and ^ question

2020-12-31 Thread Andy Bach
> try out these 3 .. 7 3 ..^ 7 3 ^.. 7 3 ^..^ 7 Is the last one called the kitten or the bat operator? ;-> Happy New Year to all those for whom the year ends tonight. For the rest Happy Tomorrow! From: yary Sent: Wednesday, December 30, 2020 9:06 PM To:

Re: for and ^ question

2020-12-31 Thread William Michels via perl6-users
On Wed, Dec 30, 2020 at 7:20 PM ToddAndMargo via perl6-users wrote: > > On 12/30/20 7:06 PM, yary wrote: > > Look up ..^ which is the long form of ^ when used in ^8 sort of thing > > > > https://docs.raku.org/routine/..$CIRCUMFLEX_ACCENT > > >