Hi! I’ve noticed that enumerate()is a macro that transforms a forloop. It seems like it would be easy to make it an iteratorinstead. Iterators are easier to implement and more composable (e.g. could be passed to templates). PR that originally added themseems to suggest that it’s because it was added before concepts, would it make sense to make enumerate()an iterator now?
enumeratealways just counts the iterations starting from 0. pairsgoes through the indecies of the array (which can be any ordinal or subrange of one). or for tables it goes through the keys.