Support enumerate on a generator

in addition change the spectral_norm benchmark to use enumerate.