Larry Wall larry-at-wall.org |Perl 6| wrote:
And since the when modifier counts as a conditional, you can rewrite
grep Dog, @mammals
as
$_ when Dog for @mammals;
So perhaps will see a lot of subtypes used this way:
subset Odd if Int where { $_ % 2 };
@evens = ($_ * 2 when
On Thu, May 21, 2009 at 11:25 PM, John M. Dlugosz
2nb81l...@sneakemail.com wrote:
Larry Wall larry-at-wall.org |Perl 6| wrote:
And since the when modifier counts as a conditional, you can rewrite
grep Dog, @mammals
as
$_ when Dog for @mammals;
So perhaps will see a lot of subtypes
Em Sex, 2009-05-22 às 01:25 -0500, John M. Dlugosz escreveu:
@primes = do $_ if prime($_) for 1..100;
becomes
@primes = $_ when prime($_) for 1..100;
you gained one stroke, it's certainly better... I think it's time to
play golf with Perl 6 already ;)
jokes aside, $_ when prime($_)
Daniel Ruoso wrote:
Em Sex, 2009-05-22 às 01:25 -0500, John M. Dlugosz escreveu:
@primes = do $_ if prime($_) for 1..100;
becomes
@primes = $_ when prime($_) for 1..100;
you gained one stroke, it's certainly better... I think it's time to
play golf with Perl 6 already ;)
On Fri, 22 May 2009, Jonathan Worthington wrote:
Daniel Ruoso wrote:
Em Sex, 2009-05-22 às 01:25 -0500, John M. Dlugosz escreveu:
@primes = do $_ if prime($_) for 1..100;
becomes
@primes = $_ when prime($_) for 1..100;
you gained one stroke, it's certainly better... I think it's
On Fri, May 22, 2009 at 5:34 AM, Timothy S. Nelson
wayl...@wayland.id.au wrote:
On Fri, 22 May 2009, Jonathan Worthington wrote:
Daniel Ruoso wrote:
Em Sex, 2009-05-22 às 01:25 -0500, John M. Dlugosz escreveu:
�...@primes = do $_ if prime($_) for 1..100;
becomes
�...@primes = $_ when
Patrick R. Michaud pmichaud-at-pobox.com |Perl 6| wrote:
The page currently says:
The reason this [.prime] works is because the method-call
syntax will call an ordinary non-member sub also.
I think this is no longer the case (and hasn't been for some time).
Pm
Wow, that's news
Em Qui, 2009-05-21 às 20:21 -0500, John M. Dlugosz escreveu:
but it was crudly inserted, so just before it the text still reads, The
dot form and the indirect object form DEFAULT to method calls. All
other prefix calls DEFAULT to subroutine calls. (emphasis mine),
That's because dot is an
Author: jnthn
Date: 2009-05-22 23:59:49 +0200 (Fri, 22 May 2009)
New Revision: 26912
Modified:
docs/Perl6/Spec/S12-objects.pod
Log:
[spec] We now always require the candidate to be passed to bless, otherwise
there's potential for confusion with the first auto-vivifying type object.
Modified:
Author: jnthn
Date: 2009-05-23 00:34:34 +0200 (Sat, 23 May 2009)
New Revision: 26914
Modified:
docs/Perl6/Spec/S12-objects.pod
Log:
[spec] Oops, forgot to save before commit.
Modified: docs/Perl6/Spec/S12-objects.pod
===
---
Please take a look at
http://www.dlugosz.com/Perl6/web/passing_examples.html.
I started working through how the detailed behavior of the Capture and
passing rules need to work, and I ran into something that startled me.
There's no examples in S06 of formal parameters, other than the special
Daniel Ruoso wrote:
Em Qui, 2009-05-21 às 20:21 -0500, John M. Dlugosz escreveu:
but it was crudly inserted, so just before it the text still reads, The
dot form and the indirect object form DEFAULT to method calls. All
other prefix calls DEFAULT to subroutine calls. (emphasis mine),
Em Sex, 2009-05-22 às 18:27 -0500, John M. Dlugosz escreveu:
Daniel Ruoso wrote:
That's because dot is an operator as well and might be subject to be
overriden... but don't tell anyone that...
You mean by installing a different dispatcher for the object? By
hooking the grammar at a lower
Daniel Ruoso daniel-at-ruoso.com |Perl 6| wrote:
Em Sex, 2009-05-22 às 18:27 -0500, John M. Dlugosz escreveu:
Daniel Ruoso wrote:
That's because dot is an operator as well and might be subject to be
overriden... but don't tell anyone that...
You mean by installing a different
On Fri, May 22, 2009 at 7:52 PM, John M. Dlugosz
2nb81l...@sneakemail.com wrote:
That sounds like a circular reference problem. If the dot is a simple multi
sub and is expected to dispatch based on type (different types may have
different dispatchers), what type are you keying off of to pick
Sartak sartak-at-gmail.com |Perl 6| wrote:
On Fri, May 22, 2009 at 7:52 PM, John M. Dlugosz
2nb81l...@sneakemail.com wrote:
That sounds like a circular reference problem. If the dot is a simple multi
sub and is expected to dispatch based on type (different types may have
different
16 matches
Mail list logo