Damian Conway wrote:
> I have a draft RFC that proposes that the LIST argument of a
> grep be optional in a hash slice, and default to the key list
> of the sliced hash. So:
That's a waste of RFC paper, Damian. But let's generalize it a bit,
and say that Perl6 should have a standard intrinsic
> Well, $hash{/re/} would only evaluate to a single scalar.
> More likely, you'd want @hash{/re/}, which would be
> equivalent to @hash{ grep { /re/ } keys %hash }.
I have a draft RFC that proposes that the LIST argument of a
grep be optional in a hash slice, and default to the key li
David Corbin wrote:
> raptor wrote:
> >
> > $hash{/re/} i.e. this is the same like
> >
> > my @res;
> > foreach my $k (keys %hash)
> > {
> > if ($k =~ /re/) {push $hash{$k},@res}
> > };
> >
> > OR
> > keys %hash{/re/}
> > values %hash{/re/}
> > each %hash{/re/}
>
> Way cool. I'd love this
raptor wrote:
>
> Hi,
>
> I have couple of ideas which may or may not worth it, so I didn't
> wrote the RFC but will list them here in short.
> Here are the nice to have'it.
>
> 1. There will be good to have some sort of "match and/or assign" operat
said in Monterey this year (I paraphrase),
"Difficult things should become easy, and the impossible should become
difficult."
Following that logic- shouldn't easy (ceiliing) become trivial (a primitive
op)?
my 2c
>From: "raptor" <[EMAIL PROTECTED]>
>To: <[
Hi,
I have couple of ideas which may or may not worth it, so I didn't
wrote the RFC but will list them here in short.
Here are the nice to have'it.
1. There will be good to have some sort of "match and/or assign" operator
for structures i.e. HASHES. Can't still figure