Would prefer to use an equality test
There is a problem with doing that in Alice.
Alice has only one numeric type named Number.
It is not an integer type.
Therefore, the value of index can have a fractional part.
Although none of the code would be expected to produce a fractional part, general accuracy problems can result in very small fractional parts.
Testing two values of type Number for absolute equality