Proper use of unfold?

Have a look at this code.