One-dimensional array indexation

Uses Array size

Array elements are indexed using brackets:
s:𝕊, Array1D(s)[ℕ.nz] : s

For literal array terms, indexation is implemented in Pharo:
s_:𝕊, A:Array1D(s_), i:ℕ.nz, A[i] ⇒ Pharo:"A ensureArrayTerm. i ensureNumber. A index: i"

Example

For an array literal:
{[1, 4, 9]}[2] ⇒ 4
Indices out of the range of valid indices are not rewritten:
{[1, 4, 9]}[4] ⇒ {[1, 4, 9]}[4]