Suffix

A suffix is a kind of subarray which is like a prefix except that values are taken from the end of the array rather than the beginning: a vector is a suffix of another vector if it is no longer than that vector, and shares all of its trailing elements. In leading axis theory, an array may be considered a suffix of another array of the same rank if the same relation holds with major cells in place of elements. The function Drop produces suffixes of its right argument when the left argument is non-negative.

In analogy to prefix testing, whether an array is a suffix may be tested using Take with a negated left argument and Match. The only difference is the negation. We can also use an  function directly by reversing both its arguments. In the second definition below, this relation is written more succinctly in a tacit style using the Over operator.

In leading axis theory, the cell shape of each k-cell in an array is a suffix of that array's shape, while the frame is a prefix of the shape.

Iverson notation and very early APLs included the notion of a suffix vector $$\omega^j(n)$$ consisting of $$n-j$$ zeros followed by $$j$$ ones; such a vector could be used to produce a length-$$j$$ suffix of a length-$$n$$ vector using Compress.