query
On this page

take

lib.take



Return the first (at most) N elements of a list.

Example

take 2 [ "a" "b" "c" "d" ]
=> [ "a" "b" ]
take 2 [ ]
=> [ ]

Type

take :: int -> [a] -> [a]

Arguments

  • [count] Number of elements to take
(lib.lists.take)

Noogle also knows

Aliases