=?iso-8859-1?q?Jonathan=20E.=20Paton?= writes:
: >
: > >Damian Conway [mailto:[EMAIL PROTECTED]] wrote:
: > >
: > >You *could* instead consider reversing the arguments to
: > all the list
: > >manipulation operators:
: > >
: > > @result = map @data { mapping() }
: > > @result = grep @data { s
[Note: I've resent this - since apparently it never made it
to the list. Can someone please complain offlist if they
did get the previous one?]
>
> >Damian Conway [mailto:[EMAIL PROTECTED]] wrote:
> >
> >You *could* instead consider reversing the arguments to
> all the list
> >manipulation ope
>
> >Damian Conway [mailto:[EMAIL PROTECTED]] wrote:
> >
> >You *could* instead consider reversing the arguments to
> all the list
> >manipulation operators:
> >
> > @result = map @data { mapping() }
> > @result = grep @data { selector() };
> > @result = sort @data { comparison() };
>
>Damian Conway [mailto:[EMAIL PROTECTED]] wrote:
>
>You *could* instead consider reversing the arguments to all the list
>manipulation operators:
>
> @result = map @data { mapping() }
> @result = grep @data { selector() };
> @result = sort @data { comparison() };
> @result
David Whipp writes:
: Piers Cawley [mailto:[EMAIL PROTECTED]] wrote:
: > Damian Conway <[EMAIL PROTECTED]> writes:
: > > I suppose this discussion also raises the vexed question
: > whether ??:: can also be put out to pasture in favour of:
: > >
: > > $val = if $x { 1 } else { 2 };
:
: I like
Piers Cawley [mailto:[EMAIL PROTECTED]] wrote:
> Damian Conway <[EMAIL PROTECTED]> writes:
> > I suppose this discussion also raises the vexed question
> whether ??:: can also be put out to pasture in favour of:
> >
> > $val = if $x { 1 } else { 2 };
I like that idea.
> Only if you can also
Damian Conway <[EMAIL PROTECTED]> writes:
> I suppose this discussion also raises the vexed question whether ??::
> can also be put out to pasture in favour of:
>
> $val = if $x { 1 } else { 2 }
Only if you can also do:
if $x { $x } else { $y } = 'foo';
But that looks really scary.
-
> Hmm. A hyperdwim operator. So that means that
>
> @result = @a ^=~ @b
>
> is the same as
>
> @result = map -> $a; $b { $a =~ $b } (@a; @b)
>
> Or something resembling that that actually works...
>
> Hmm. I suppose it could be argued that a C in list context:
>
> @result = fo