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

Re^3: (almost) foldl

by ikegami (Patriarch)
on Jun 08, 2011 at 07:46 UTC ( [id://908644]=note: print w/replies, xml ) Need Help??


in reply to Re^2: (almost) foldl
in thread (almost) foldl

Are you saying that creating vars named $_[0] (like you did) is better than creating a var named $acc, or did you just not read my post?

Replies are listed 'Best First'.
Re^4: (almost) foldl
by dk (Chaplain) on Jun 08, 2011 at 15:46 UTC
    $_[0] is not created, $acc is, hence it is an extra. The rules say "no extra vars", so your post is missing a point. Which means also that your sarcasm of me allegedly not reading your post is undeserved - I did read it.

      There's no sarcasm. What I said should be interpreted literally.

      $_[0] is not created

      It didn't exist before splice(@_, 0, 0, 1) and your equivalent, and it does afterwards. That's the very definition of created.

      (If you're gonna argue that $_[0] did exist, then its $_[$#_] you created.)

      Where splice and my create the variable differs, but both create a new scalar variable.

      The rules say "no extra vars",

      Again, you've created a whole bunch of vars. If you're not subject to your rule, I'm definitely not.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-18 04:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found