Index

Working with abstract algebra? See index (abstract algebra)


Returns the position of an element on a vector.

index(Element, Vector | List)

Given an element and a vector or list, returns the index of the first occurrence (starting at 1). If the element does not belong to the vector or list, returns 0.

index(Element, Vector | List, Integer)

Given an element, a vector or list and an integer n, returns the index of the first occurrence after position n. If the element does not belong to the vector or list, returns 0.