[programmingPearls/chapter_02] cycle shift fix bug