Ashley Winters wrote:
> > $_ = new Doberman for $spot, $rover;
>
> Hmm, I thought the for topic was made ro at some point. Odd.
Not the standard $_ topic. Only named topics default to read-only.
> However, I still expect to be able to use my() in a loop condition/iterator
> and have it visible to the outer scope!
I too expect it will work.
> given my Doberman $sis is female = .dog[0] but pregnant -> $mother {
> for my Doberman @puppies = new Doberman x $mother.littersize
I'd have thought you'd need:
for my Doberman @puppies = (new Doberman) x $mother.littersize
Both for precedence, and to get the list semantics of C<x>.
> -> Doberman $puppy is cute {
> my @colors := Doberman.colors;
> $puppy.color = @colors[rand(@colors.end)];
> }
>
> $mother.labor($_) for @puppies;
> }
>
> $sis.feed();
>
> I gave way too much thought to that. I need to go, now...
"Once you start down the Perl 6 path, forever will it dominate
your coding; consume you it will!"
;-)
Damian