# 列表函数

创建、拆分与变换列表：对每个元素应用函数、折叠、连接、划分、计数与查找元素。

52 个函数

## 有说明的函数

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

  列表中元素的个数。
- [map](https://zh.hilberon.com/library/map)

  对列表中的每个元素应用一个函数。
- [range](https://zh.hilberon.com/library/range)

  某个范围内的整数，以列表形式给出。
- [table](https://zh.hilberon.com/library/table)

  在一个或多个范围上求值表达式，构建列表。
- [accumulate](https://zh.hilberon.com/library/accumulate)

  列表的累计总和。
- [append](https://zh.hilberon.com/library/append)

  在末尾添加一个元素后的列表。
- [apply](https://zh.hilberon.com/library/apply)

  把表达式的头部或列表的括号替换为函数。
- [complement](https://zh.hilberon.com/library/complement)

  某个列表中不在其他任何列表里的元素。
- [constant_array](https://zh.hilberon.com/library/constant_array)

  由某个值的若干副本组成的列表。
- [count](https://zh.hilberon.com/library/count)

  列表中有多少个元素等于某个值。
- [dimensions](https://zh.hilberon.com/library/dimensions)

  列表或矩阵的大小，逐层给出。
- [drop](https://zh.hilberon.com/library/drop)

  去掉开头若干元素后的列表。
- [first](https://zh.hilberon.com/library/first)

  列表的第一个元素。
- [flatten](https://zh.hilberon.com/library/flatten)

  把嵌套列表展平为一个列表。
- [fold](https://zh.hilberon.com/library/fold)

  从左侧开始，用函数把列表的元素逐步结合，并从某个值出发。
- [fold_list](https://zh.hilberon.com/library/fold_list)

  fold 的各个步骤：从初始值开始的每一个中间结果。
- [head](https://zh.hilberon.com/library/head)

  表达式的头部：它所调用的函数的名称。
- [intersection](https://zh.hilberon.com/library/intersection)

  同时属于若干个列表的所有元素。
- [join](https://zh.hilberon.com/library/join)

  将多个列表合并为一个。
- [last](https://zh.hilberon.com/library/last)

  列表的最后一个元素。
- [list](https://zh.hilberon.com/library/list)

  由参数构成的列表。
- [map_thread](https://zh.hilberon.com/library/map_thread)

  对多个列表中对应的元素应用一个函数。
- [most](https://zh.hilberon.com/library/most)

  去掉最后一个元素的列表。
- [nest](https://zh.hilberon.com/library/nest)

  对一个值反复应用函数。
- [nest_list](https://zh.hilberon.com/library/nest_list)

  nest 的各个步骤：每次应用后的值，从第一次开始。
- [part](https://zh.hilberon.com/library/part)

  按位置（从 1 开始计数）读取列表的一部分；也可写作 list\[i\]。
- [partition](https://zh.hilberon.com/library/partition)

  将列表按给定长度拆分为若干块。
- [position](https://zh.hilberon.com/library/position)

  某个值在列表中出现的位置，以位置列表表示。
- [prepend](https://zh.hilberon.com/library/prepend)

  在开头添加一个元素后的列表。
- [replace_part](https://zh.hilberon.com/library/replace_part)

  把某个位置上的部分替换后的列表；写作 position -> value。
- [rest](https://zh.hilberon.com/library/rest)

  去掉第一个元素后的列表。
- [reverse](https://zh.hilberon.com/library/reverse)

  逆序排列的列表。
- [riffle](https://zh.hilberon.com/library/riffle)

  在元素之间插入某个值后的列表。
- [rotate_left](https://zh.hilberon.com/library/rotate_left)

  列表的元素向左移动，开头的元素移到末尾。
- [rotate_right](https://zh.hilberon.com/library/rotate_right)

  列表的元素向右移动，末尾的元素移到开头。
- [select](https://zh.hilberon.com/library/select)

  列表中满足某个测试的元素。
- [sort](https://zh.hilberon.com/library/sort)

  按递增顺序排列的列表。
- [subsets](https://zh.hilberon.com/library/subsets)

  列表所有保持顺序的子列表，以列表形式给出。
- [take](https://zh.hilberon.com/library/take)

  列表的前几个元素。
- [tally](https://zh.hilberon.com/library/tally)

  每个元素出现的次数：元素与计数对的列表。
- [thread](https://zh.hilberon.com/library/thread)

  把函数应用到列表的对应元素上。
- [total](https://zh.hilberon.com/library/total)

  列表元素之和。
- [union](https://zh.hilberon.com/library/union)

  出现在任意一个列表中的元素，每个只出现一次，按顺序。

## 此类别中的其他函数

这些函数还没有说明，每个只列出它的第一种写法。

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

## 其他类别

- [抽象代数](https://zh.hilberon.com/library/category/abstract-algebra) 55
- [代数](https://zh.hilberon.com/library/category/algebra) 52
- [假设](https://zh.hilberon.com/library/category/assumptions) 10
- [微积分](https://zh.hilberon.com/library/category/calculus) 21
- [微分方程与差分方程](https://zh.hilberon.com/library/category/differential-and-difference-equations) 187
- [初等函数](https://zh.hilberon.com/library/category/elementary-functions) 34
- [方程求解](https://zh.hilberon.com/library/category/equation-solving) 15
- [线性代数](https://zh.hilberon.com/library/category/linear-algebra) 44
- [逻辑与比较](https://zh.hilberon.com/library/category/logic-and-comparison) 45
- [数论](https://zh.hilberon.com/library/category/number-theory) 53
- [数值计算](https://zh.hilberon.com/library/category/numerical-computation) 5
- [优化](https://zh.hilberon.com/library/category/optimization) 6
- [展示](https://zh.hilberon.com/library/category/presentation) 7
- [概率与随机过程](https://zh.hilberon.com/library/category/probability-and-stochastic-processes) 73
- [编程](https://zh.hilberon.com/library/category/programming) 43
- [级数与求和](https://zh.hilberon.com/library/category/series-and-sums) 17
- [特殊函数](https://zh.hilberon.com/library/category/special-functions) 95
- [字符串](https://zh.hilberon.com/library/category/strings) 4
- [变换](https://zh.hilberon.com/library/category/transforms) 15
- [三角学](https://zh.hilberon.com/library/category/trigonometry) 28

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