No, the result is 4! It certainly prints 4 on my machine.
The closure variable $i is initially set to 1, gets incremented by addone, then added to the parameter $y, which is 2. Answer 4.
--
Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)
In reply to Re: Nailing down closures!
by rinceWind
in thread Nailing down closures!
by mattford63
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |