take `n`, applied to a list `xs`, returns the
prefix of `xs` of length `n`, or `xs` itself if
`n >= length xs`.
`n` may be of any integral type.

>>> take 5 "Hello World!" "Hello" >>> take 3 [1,2,3,4,5] [1,2,3] >>> take 3 [1,2] [1,2] >>> take 3 [] [] >>> take (-1) [1,2] [] >>> take 0 [1,2] []It is an instance of the more general genericTake, in which

Take a given number of entries in key order, beginning with the
smallest keys.

take n = fromDistinctAscList . take n . toAscList

The first `i` elements of a sequence. If
`i` is negative, `take i s` yields the empty
sequence. If the sequence contains fewer than `i` elements, the
whole sequence is returned.

Take a given number of elements in order, beginning with the smallest
ones.

take n = fromDistinctAscList . take n . toAscList

attoparsec Data.Attoparsec.ByteString Data.Attoparsec.ByteString.Char8 Data.Attoparsec.ByteString.Lazy

Consume exactly `n` bytes of input.

Consume exactly `n` characters of input.

Consume `n` bytes of input.

Stream up to n number of values downstream.
Note that, if downstream terminates early, not all values will be
consumed. If you want to force *exactly* the given number of
values to be consumed, see takeExactly.
Subject to fusion

Take some values from the stream and return as a list. If you want to
instead create a conduit that pipes data to another sink, see
isolate. This function is semantically equivalent to:

take i = isolate i =$ consumeSubject to fusion Since 0.3.0

take `n`, applied to a list `xs`, returns the
prefix of `xs` of length `n`, or `xs` itself if
`n > length xs`:
`n` may be of any integral type.

take 5 "Hello World!" == "Hello" take 3 [1,2,3,4,5] == [1,2,3] take 3 [1,2] == [1,2] take 3 [] == [] take (-1) [1,2] == [] take 0 [1,2] == []It is an instance of the more general genericTake, in which

Take the given number of bytes, if available.
Since 0.3.0

take 0 = return () take (m + n) = take m >> take n

take <infinity> = cat take (min m n) = take m >-> take n

Take @n bytes from the current position in the stream