Solution to Reverse Iterate Exercise