lc on arrays

2012-05-21 Thread Parrot Raiser
./perl6 -e 'my @a = < A B C >; @a = lc @a; say @a, " Size = ", @a + 0;' a b c Size = 1 Is this the way lc is supposed to operate on the elements of an array? I.e. converting the individual elements of the source, but combining them into one element in the destination.

[perl #113026] array iterator does not track a growing array

2012-05-21 Thread via RT
# New Ticket Created by Siddhant Saraf # Please include the string: [perl #113026] # in the subject line of all future correspondence about this issue. # https://rt.perl.org:443/rt3/Ticket/Display.html?id=113026 > $ perl6 -v This is perl6 version 2012.05-15-gdca0fa6 built on parrot 4.4.0 revi

[perl #113026] a much better bug report

2012-05-21 Thread Siddhant Saraf
(so please ignore my initial report, because it was lazily written, here is the proper bugreport, restated with clarity) The following loop should iterate infinitely, but it does not: my @array = 1, 2; for @array -> $n { $n.say; @array.push: $n + 2; } say @rray;

Re: lc on arrays

2012-05-21 Thread Will Coleda
On Mon, May 21, 2012 at 11:50 AM, Parrot Raiser <1parr...@gmail.com> wrote: > ./perl6 -e 'my @a = < A B C >; @a = lc @a; say @a, " Size = ", @a + 0;' > a b c Size = 1 > > Is this the way lc is supposed to operate on the elements of an array? > > I.e. converting the individual elements of the source

[perl #113026] array iterator does not track a growing array

2012-05-21 Thread Patrick R. Michaud via RT
I suspect this bug may be related to #112716 (https://rt.perl.org/rt3/Ticket/Display.html?id=112716); the .map() operation (which 'for' uses) tends to be a bit too eager in evaluating its invocant list. I've taken both bugs and will work on a fix shortly. Pm

Fwd: lc on arrays

2012-05-21 Thread Carl Mäsak
I liked Coke++'s response, but was kinda wondering why he was repeating things I had already said... Then I discovered I had only replied to Parrot Raiser, and not to p6u. So here, belatedly, is my response. :-) // Carl -- Forwarded message -- From: Carl Mäsak Date: Mon, May 21,

Re: Fwd: lc on arrays

2012-05-21 Thread Patrick R. Michaud
On Mon, May 21, 2012 at 10:08:34PM +0200, Carl Mäsak wrote: > >    @a = @a.map: { lc $_ }; >    @a = @a.map: { .lc }; >    @a = @a.map: &lc; >    @a = @a».lc; >    @a».=lc; >    @a = (.lc for @a); > > Many ways to skin a cat -- [...] Also: @a .= map(*.lc); @a .= map: *.lc This somewhat