List functions
Build, take apart and transform lists: map, fold, join, partition, count and search their elements.
52 functions
Described functions
- length
Number of elements in a list.
- map
Apply a function to every element of a list.
- range
The whole numbers in a range, as a list.
- table
Build a list by evaluating an expression over one or more ranges.
- accumulate
Running totals of a list.
- append
A list with an element added at the end.
- apply
Replace the head of an expression, or the brackets of a list, with a function.
- complement
The elements of a list that are in none of the others.
- constant_array
A list of copies of a value.
- count
How many elements of a list equal a value.
- dimensions
The size of a list or a matrix, level by level.
- drop
A list without its first elements.
- first
The first element of a list.
- flatten
Nested lists flattened into one list.
- fold
Combine the elements of a list from the left with a function, starting from a value.
- fold_list
The steps of fold: every partial result, starting from the first value.
- head
The head of an expression: the name of the function it is a call of.
- intersection
The elements that are in every one of some lists.
- join
Join lists into one.
- last
The last element of a list.
- list
A list of the arguments.
- map_thread
Apply a function to corresponding elements of several lists.
- most
A list without its last element.
- nest
Apply a function again and again to a value.
- nest_list
The steps of nest: the value after each application, starting from the first.
- part
Read part of a list by position, counting from 1; also written list[i].
- partition
A list split into blocks of a given length.
- position
Where a value occurs in a list, as a list of positions.
- prepend
A list with an element added at the start.
- replace_part
A list with the part at a position replaced; write position -> value.
- rest
A list without its first element.
- reverse
A list in reverse order.
- riffle
A list with a value put between its elements.
- rotate_left
A list with its elements moved to the left, the first ones going to the end.
- rotate_right
A list with its elements moved to the right, the last ones going to the front.
- select
The elements of a list for which a test holds.
- sort
A list in increasing order.
- subsets
All the sublists of a list that keep its order, as a list.
- take
The first elements of a list.
- tally
How often each element occurs: a list of element and count pairs.
- thread
Apply a function to corresponding elements of lists.
- total
Sum of the elements of a list.
- union
The elements in any of some lists, each once, in order.
More functions in this category
Nobody has described these yet: each is listed with its first form.
Other categories
- Abstract algebra55
- Algebra52
- Assumptions10
- Calculus21
- Differential and difference equations187
- Elementary functions34
- Equation solving15
- Linear algebra44
- Logic and comparison45
- Number theory53
- Numerical computation5
- Optimization6
- Presentation7
- Probability and stochastic processes73
- Programming43
- Series and sums17
- Special functions95
- Strings4
- Transforms15
- Trigonometry28