fix enumerate to correctly iterate more than once
add tests
fix type annotations
Merge pull request #39 from google/fix_enumerate

fix enumerate to correctly iterate more than once