跳转到内容

This page is also in English.

Read it in English

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

Léela en español

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

日本語で読む

union 函数

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

怎么写

union(a, b, ...)

a
一个列表。接受一个列表。
b
一个列表。接受一个列表。

示例

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

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

    在求解器中打开
  • accumulate

    列表的累计总和。

  • total

    列表元素之和。

  • append

    在末尾添加一个元素后的列表。

  • thread

    把函数应用到列表的对应元素上。

  • apply

    把表达式的头部或列表的括号替换为函数。

  • tally

    每个元素出现的次数:元素与计数对的列表。