Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^4: [Perl 6] Any provision for a "dereferencing object"?

by blazar (Canon)
on May 29, 2007 at 11:53 UTC ( #617946=note: print w/replies, xml ) Need Help??

in reply to Re^3: [Perl 6] Any provision for a "dereferencing object"?
in thread [Perl 6] Any provision for a "dereferencing object"?

$dereferencer = { .<foo>[1]<bar><baz>[3] };

I knew that "unary" dot acts implicitly on $_, but appearently your code implies that in code written as a bare block $_ is an alias to the first positional argument, and that I didn't know. Actually, without knowing, I would have written the above amongst other possibilities, like:

$dereferencer = -> $d { $d.<foo>[1]<bar><baz>[3] };

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://617946]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2016-10-28 19:58 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (387 votes). Check out past polls.