Skip to main content

List.at

atindex

Group: Selections

Documentation

Gets an element from the list at a specified index (0-based).

Arguments

  • index: The location in the List to get the element from. The index is also allowed be negative, then the elements are indexed from the back of the final item, i.e. -1 will correspond to the last element.

Examples

Get the second item by index.

      import Standard.Examples

example_length = Examples.list.length

Remarks

Computational Complexity

Note that this is a linear operation requiring O(n) time.