On Fri, Sep 03, 2004 at 02:56:48PM +0100, Peter Haworth wrote:
: n-ary zip() is simple enough, but the infix ? makes zipping more than
: two lists somewhat entertaining. Without iterators doesn't work well:
:
: @a ? @b produces (@a[0],@b[0],@a[1],@b[1],...)
:
: which is what we wanted, but
:
:
On Thu, 19 Aug 2004 19:45:37 -0700, Larry Wall wrote:
> To process two arrays in parallel, use either the zip function:
>
> for zip(@a,@b) -> $a, $b { print "[$a, $b]\n" }
>
> or the "zipper" operator to interleave them:
>
> for @a ¥ @b ¥ @c -> $a, $b, $c { print "[$a, $b, $c]\n" }
n-ary z
On Fri, Aug 20, 2004 at 12:39:35AM -0700, Brent 'Dax' Royal-Gordon wrote:
: Larry, you're a genius.
Yeah, well, that and 150 cents'll get me a cup of coffee...
Larry
On Fri, Aug 20, 2004 at 09:04:48AM -0700, Dave Whipp wrote:
: > Parameters are by default constant within the block. You can
: > declare a parameter read/write by including the "C" trait.
: > If you rely on C<$_> as the implicit parameter to a block, then
: > then C<$_> is considered read/write by
On Fri, Aug 20, 2004 at 09:18:06AM -0500, Jonathan Scott Duff wrote:
: Whither REDO {...} ? Or do we just manufacture that ourselves with
: NEXT?
Hmm, well, you can view C as just a C in disguise,
or as a C that suppresses the "while" check. But I think it's
seldom enough used that it doesn't r
Aaron Sherman writes:
> Larry Wall wrote:
> > leave :from(Loop) :labelÂLINEÂ <== 1,2,3;
> > [...]
> > leave <== :foo:bar:baz(1) if $leaving;
>
> I know it's probably just me, but This section seems to suddenly rely on
> a lot more knowledge of the current state of Perl 6 syntax than I have.
> Parameters are by default constant within the block. You can
> declare a parameter read/write by including the "C" trait.
> If you rely on C<$_> as the implicit parameter to a block, then
> then C<$_> is considered read/write by default. That is,
> the construct:
>
> for @foo {...}
>
> is a
On Thu, Aug 19, 2004 at 07:45:37PM -0700, Larry Wall wrote:
> BEGIN {...}*at compile time, ASAP
> CHECK {...}*at compile time, ALAP
>INIT {...}*at run time, ASAP
> END {...} at run time, ALAP
> FIRST {...}*at first block entry time
> ENTER
Larry Wall wrote:
=head1 Title
Synopsis 4: a Summary of Apocalypse 4
A little light reading is always good in the morning ;-)
To return a value from a pointy sub or bare closure, you either
just mention the value last that you want to return, or you can
use C. A C by default exits from the inne
Larry Wall <[EMAIL PROTECTED]> wrote:
> Final blocks on statement-level constructs always imply semicolon
> precedence afterwards regardless of the position of the closing curly.
> Statement-level constructs are distinguished in the grammar by being
> declared in the statement syntactic group:
>
>
10 matches
Mail list logo