added Iterable.each with extra counter parameter (as in forEach)