Optimize function with complex square root

Fair enough. I was saying that eachindex is more generic for the purpose of having both index and element, but maybe it would be best to say that eachindex is the correct choice for that purpose and enumerate is designed for another purpose (easily adding an iteration counter on a loop).

1 Like