in reply to (almost) foldl

Not as elegant, but waaaaaaay more efficient:

print sub{ unshift@_,0; $_[0]+= pop while @_>1; return @_ }->( 1..1e6) +;; 500000500000

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.