For loop optimization

The for loop was not optimized. It was calculating the length of `resolvers` on every iteration of the loop, so I moved it into the first statement, effectively caching the length and preventing this from being unnecessarily called too many times.
Merge pull request #8 from acconrad/patch-1

For loop optimization