# List functions

Build, take apart and transform lists: map, fold, join, partition, count and search their elements.

52 functions

## Described functions

- [length](https://hilberon.com/library/length)

  Number of elements in a list.
- [map](https://hilberon.com/library/map)

  Apply a function to every element of a list.
- [range](https://hilberon.com/library/range)

  The whole numbers in a range, as a list.
- [table](https://hilberon.com/library/table)

  Build a list by evaluating an expression over one or more ranges.
- [accumulate](https://hilberon.com/library/accumulate)

  Running totals of a list.
- [append](https://hilberon.com/library/append)

  A list with an element added at the end.
- [apply](https://hilberon.com/library/apply)

  Replace the head of an expression, or the brackets of a list, with a function.
- [complement](https://hilberon.com/library/complement)

  The elements of a list that are in none of the others.
- [constant_array](https://hilberon.com/library/constant_array)

  A list of copies of a value.
- [count](https://hilberon.com/library/count)

  How many elements of a list equal a value.
- [dimensions](https://hilberon.com/library/dimensions)

  The size of a list or a matrix, level by level.
- [drop](https://hilberon.com/library/drop)

  A list without its first elements.
- [first](https://hilberon.com/library/first)

  The first element of a list.
- [flatten](https://hilberon.com/library/flatten)

  Nested lists flattened into one list.
- [fold](https://hilberon.com/library/fold)

  Combine the elements of a list from the left with a function, starting from a value.
- [fold_list](https://hilberon.com/library/fold_list)

  The steps of fold: every partial result, starting from the first value.
- [head](https://hilberon.com/library/head)

  The head of an expression: the name of the function it is a call of.
- [intersection](https://hilberon.com/library/intersection)

  The elements that are in every one of some lists.
- [join](https://hilberon.com/library/join)

  Join lists into one.
- [last](https://hilberon.com/library/last)

  The last element of a list.
- [list](https://hilberon.com/library/list)

  A list of the arguments.
- [map_thread](https://hilberon.com/library/map_thread)

  Apply a function to corresponding elements of several lists.
- [most](https://hilberon.com/library/most)

  A list without its last element.
- [nest](https://hilberon.com/library/nest)

  Apply a function again and again to a value.
- [nest_list](https://hilberon.com/library/nest_list)

  The steps of nest: the value after each application, starting from the first.
- [part](https://hilberon.com/library/part)

  Read part of a list by position, counting from 1; also written list\[i\].
- [partition](https://hilberon.com/library/partition)

  A list split into blocks of a given length.
- [position](https://hilberon.com/library/position)

  Where a value occurs in a list, as a list of positions.
- [prepend](https://hilberon.com/library/prepend)

  A list with an element added at the start.
- [replace_part](https://hilberon.com/library/replace_part)

  A list with the part at a position replaced; write position -> value.
- [rest](https://hilberon.com/library/rest)

  A list without its first element.
- [reverse](https://hilberon.com/library/reverse)

  A list in reverse order.
- [riffle](https://hilberon.com/library/riffle)

  A list with a value put between its elements.
- [rotate_left](https://hilberon.com/library/rotate_left)

  A list with its elements moved to the left, the first ones going to the end.
- [rotate_right](https://hilberon.com/library/rotate_right)

  A list with its elements moved to the right, the last ones going to the front.
- [select](https://hilberon.com/library/select)

  The elements of a list for which a test holds.
- [sort](https://hilberon.com/library/sort)

  A list in increasing order.
- [subsets](https://hilberon.com/library/subsets)

  All the sublists of a list that keep its order, as a list.
- [take](https://hilberon.com/library/take)

  The first elements of a list.
- [tally](https://hilberon.com/library/tally)

  How often each element occurs: a list of element and count pairs.
- [thread](https://hilberon.com/library/thread)

  Apply a function to corresponding elements of lists.
- [total](https://hilberon.com/library/total)

  Sum of the elements of a list.
- [union](https://hilberon.com/library/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.

- [array](https://hilberon.com/library/array)
- [cases](https://hilberon.com/library/cases)
- [delete_cases](https://hilberon.com/library/delete_cases)
- [depth](https://hilberon.com/library/depth)
- [is_atom](https://hilberon.com/library/is_atom)
- [is_free](https://hilberon.com/library/is_free)
- [is_member](https://hilberon.com/library/is_member)
- [leaf_count](https://hilberon.com/library/leaf_count)
- [sequence](https://hilberon.com/library/sequence)

## Other categories

- [Abstract algebra](https://hilberon.com/library/category/abstract-algebra) 55
- [Algebra](https://hilberon.com/library/category/algebra) 52
- [Assumptions](https://hilberon.com/library/category/assumptions) 10
- [Calculus](https://hilberon.com/library/category/calculus) 21
- [Differential and difference equations](https://hilberon.com/library/category/differential-and-difference-equations) 187
- [Elementary functions](https://hilberon.com/library/category/elementary-functions) 34
- [Equation solving](https://hilberon.com/library/category/equation-solving) 15
- [Linear algebra](https://hilberon.com/library/category/linear-algebra) 44
- [Logic and comparison](https://hilberon.com/library/category/logic-and-comparison) 45
- [Number theory](https://hilberon.com/library/category/number-theory) 53
- [Numerical computation](https://hilberon.com/library/category/numerical-computation) 5
- [Optimization](https://hilberon.com/library/category/optimization) 6
- [Presentation](https://hilberon.com/library/category/presentation) 7
- [Probability and stochastic processes](https://hilberon.com/library/category/probability-and-stochastic-processes) 73
- [Programming](https://hilberon.com/library/category/programming) 43
- [Series and sums](https://hilberon.com/library/category/series-and-sums) 17
- [Special functions](https://hilberon.com/library/category/special-functions) 95
- [Strings](https://hilberon.com/library/category/strings) 4
- [Transforms](https://hilberon.com/library/category/transforms) 15
- [Trigonometry](https://hilberon.com/library/category/trigonometry) 28

---
Source: https://hilberon.com/library/category/lists
