Change loops from index to value

Particularly on line 66, this looks better. Effective Go refers to this
technique.