Skip to content

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

Léela en español

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

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

take function

The first elements of a list.

How to write it

take(list, n)

list
The list. Takes a list.
n
How many elements. Takes a whole number.

Examples

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

    In the solver, take([1, 2, 3, 4], 2) gives [1, 2].

    Open in the solver
  • tally

    How often each element occurs: a list of element and count pairs.

  • table

    Build a list by evaluating an expression over one or more ranges.

  • thread

    Apply a function to corresponding elements of lists.

  • subsets

    All the sublists of a list that keep its order, as a list.

  • total

    Sum of the elements of a list.

  • sort

    A list in increasing order.