跳转到内容

This page is also in English.

Read it in English

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

rest 函数

去掉第一个元素后的列表。

怎么写

rest(list)

list
列表。接受一个列表。

示例

  • rest⁡([1,2,3])=[2,3]\displaystyle \operatorname{rest}(\left[ 1, 2, 3 \right]) = \left[ 2, 3 \right]
    rest([1, 2, 3])

    在求解器中,rest([1, 2, 3]) 的结果是 [2, 3]。

    在求解器中打开
  • reverse

    逆序排列的列表。

  • replace_part

    把某个位置上的部分替换后的列表;写作 position -> value。

  • riffle

    在元素之间插入某个值后的列表。

  • range

    某个范围内的整数,以列表形式给出。

  • rotate_left

    列表的元素向左移动,开头的元素移到末尾。

  • prepend

    在开头添加一个元素后的列表。