code minimizing

I can't see that that works at all - are you sure?

It is because the [ i ] got stripped out by the forum software, because the code is not in a code box. With the index in place, the code is perfectly valid.