: my %h;
: [EMAIL PROTECTED] = @v;
:
: But is there an easy way in Perl6 to do it all in one go? Should this
work?
:
: my %h = @k [=>] @v;
Reduce operators only turn infix into list operators. What you really
want here is a hyper-fatarrow:
my %h = @k »=>« @v;
Gaal pointed out using zip
I asked this same question on perl6-users, but no one really seemed to have
a definitive answer, so please forgive me for reasking.
I was wondering how named arguments would work when parameters of different
types had the same name, ie sub foo($bar, @bar, &bar) {...}. I wrote a
little script to
Mostly, it's that func('&x' => 1) requires a bit too much typing, and also
makes it hard for func() to change its signature later on to accept things
other than Code.
I was discussing this with a friend of mine (Eric Livak), and he suggested
making the sigil on the name optional for disambigua
> $foo.subst(:g, /bar/, "baz")
>
i seem to recall
$foo.subst(/:g bar/, "baz")
is valid syntax already.
If I'm not mistaken, the aversion to that syntax- as implied earlier in this
thread- was that the :g is really a modifier on the substitution, not on the
matching. (Please correct