consider this:
say for map {...} grep {...} map {...} 1..1_000_000
as far as I can imagine, in perl5 it does:
1)flatten 1..1_000_000 into anonimous array; (maybe in this particular
case it is optimized in perl5, like it done in C.. I don't know.)
2)map trough it elements and store results in
Alexey Trofimenko writes:
> I remember perl5 scalar:
> scalar($a, $b, $c)
In Perl 6, I presume that means the same as:
[ $a, $b, $c ]
> hm.. sorry, scalar() isn't needed at all:)
>
> 2+(test,test,test)
Likewise, this would be:
2+[test, test, test]
Which should be:
2+3
Ass
On Thu, 1 Jul 2004 16:14:37 -0700 (PDT), Jonathan Lang
<[EMAIL PROTECTED]> wrote:
Actually, the whole purpose of the C-style comma is to allow you to place
multiple expressions in a place that's only designed to take one, such as
the various divisions within a loop control set ("loop ($i = 0, $j
On Tue, 2004-06-29 at 11:34, Austin Hastings wrote:
> [...] when you switch to LC_ALL= language>, you just get really slow performance: Apparently the 'C'
> locale is such a totally special case that the performance of LC_ALL=C
> is one or more orders of magnitude better than LC_ALL=en_US.UTF-8,
- Original Message -
From: Dan Hursh <[EMAIL PROTECTED]>
Date: Friday, July 2, 2004 2:23 pm
Subject: push with lazy lists
> Hi,
>
> If I can assume:
>
> @x = 3..5;
> say pop @x;# prints 5
>
> @x = 3..5;
> push @x, 6;
> say pop @x;# prints 6
>
Hi,
If I can assume:
@x = 3..5;
say pop @x;# prints 5
@x = 3..5;
push @x, 6;
say pop @x;# prints 6
say pop @x;# prints 5
What should I expect for the following?
@x = 3..Inf;
say pop @x;# heat death?
- Original Message -
From: David Storrs <[EMAIL PROTECTED]>
Date: Thursday, July 1, 2004 7:55 pm
Subject: Re: if not C<,> then what?
> On Thu, Jul 01, 2004 at 04:14:37PM -0700, Jonathan Lang wrote:
> > Juerd wrote:
> >
> > If you're really enamoured with the infix operator syntax,
> cons
Rod Adams wrote:
Well, that's another explanation that jives with my understanding of
them. But I still don't have an idea of when I would actually want
to use them in something I'm writing.
You can use them to implement all sorts of interesting control flow
constructs.
For example, here's
Andy Dougherty wrote:
The Solaris compiler complained when classes/complex.c tried to return a
value from a void function. This patch assumes the function indeed is
intended to be void and no return value is needed.
You're right, it slipped.
We really need compiler flags to catch these.
Still, it
On Thu, Jul 01, 2004 at 04:14:37PM -0700, Jonathan Lang wrote:
> Juerd wrote:
>
> If you're really enamoured with the infix operator syntax, consider this
> possibility:
>
> sub infix:-> ($before, $after) {
> $before; # is this line redundant?
> return $after;
> }
> print $
Andy Dougherty (via RT) wrote:
The Solaris compiler complained when classes/complex.c tried to return a
value from a void function. This patch assumes the function indeed is
intended to be void and no return value is needed.
Thanks, applied.
leo
11 matches
Mail list logo