Index
Note
Working with abstract algebra? See Index (Abstract Algebra).
Returns the position of an element on a vector.
Syntax
index(Element, Vector | List)
index(Element, Vector | List, Integer)
Description
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.
Given an element, a vector or list and an integer , returns the index of the first occurrence after position . If the element does not belong to the vector or list, returns 0.