What do you think it does?

What happened when you stepped through this with a piece of paper and a pencil?

What happened when you wrote a little test program that runs this code?