---
name: "Array.take"
section: "3kaya"
platform: "linux"
package: "kaya"
version: "0.4.4-6.2"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/Array.take"
---

# Array.take(3kaya)

Take the first x elements from an array.

## NAME

Array::take - Take the first x elements from an array.

## SYNOPSIS

**\[a\] take(** *Int x, \[a\] xs* **)**

## ARGUMENTS

**x** The number of elements to take

**xs** The array of elements

## DESCRIPTION

Take the first *x* elements from an array, and return a new array, leaving the original unmodified. This is equivalent to **subarray(xs,0,x)**

## AUTHORS

Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/

## LICENSE

The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.

## RELATED

**Array.subarray (3kaya)**
