Elements of Lists
Functions for accessing elements of lists using either indices, positions, or patterns of criteria.
- Append — add an element at the end of an expression
- AppendTo — add an element at the end of an stored list or expression
- Cases — list elements matching a pattern
- Count — count the number of occurrences of a pattern
- Delete — delete elements from a list at given positions
- DeleteCases — delete all occurrences of a pattern
- Drop — remove a number of elements from a list
- Extract — extract elements that appear at a list of positions
- First — first element of a list or expression
- FirstCase — first element that matches a pattern
- FirstPosition — position of the first element matching a pattern
- Insert — insert an element at a given position
- Last — last element of a list or expression
- Length — number of elements in a list or expression
- Most — remove the last element
- Part — get/set any part of an expression
- Pick — pick out elements according to a boolean mask
- Position — positions of matching elements
- Prepend — add an element at the beginning
- PrependTo — add an element at the beginning of an stored list or expression
- ReplacePart — replace elements at given positions
- Rest — remove the first element
- Select — pick elements according to a criterion
- Span — general specification for spans or blocks of elements
- Take — pick a range of elements
- UpTo — a certain number of elements, or as many as are available