Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Problems with map(function, array)

by Redei (Initiate)
on Dec 12, 2012 at 14:06 UTC ( #1008504=note: print w/replies, xml ) Need Help??


in reply to Re: Problems with map(function, array)
in thread Problems with map(function, array)

Thank you very much. That is just what I needed. Now, instead of

sub twice { 2 * (shift // $_) }

I'll use something like

sub twice(_) { 2 * shift }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008504]
help
Chatterbox?
[liz]: ^10 is just a short way of saying 0..^10, which is a short way of saying 0..9
[liz]: ^N is a very common idiom in Perl 6 to indicate "N times"
[liz]: The ^ indicates "exclude endpoint from range"

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2018-07-16 16:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (344 votes). Check out past polls.

    Notices?