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

$_[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.

Replies are listed 'Best First'.
Re^5: (almost) foldl
by ikegami (Pope) on Jun 14, 2011 at 22:14 UTC

    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.