Ambiguous to know the better implementation

There was no separation between the bad implementation and the better one. 
It took me a minute to get the difference after I scrolled down and realized that i finished reading the section
but did not find the correct implementation. Then I scrolled up and observed that both implmentations(good and the bad)
were in the same <code> tag.