take -package:base -is:exact -is:exact -package:filepath package:containers

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
Take while a predicate on the keys holds. The user is responsible for ensuring that for all Ints, j < k ==> p j >= p k. See note at spanAntitone.
takeWhileAntitone p = fromDistinctAscList . takeWhile (p . fst) . toList
takeWhileAntitone p = filterWithKey (\k _ -> p k)
Take while a predicate on the elements holds. The user is responsible for ensuring that for all Ints, j < k ==> p j >= p k. See note at spanAntitone.
takeWhileAntitone p = fromDistinctAscList . takeWhile p . toList
takeWhileAntitone p = filter p
Take while a predicate on the keys holds. The user is responsible for ensuring that for all keys j and k in the map, j < k ==> p j >= p k. See note at spanAntitone.
takeWhileAntitone p = fromDistinctAscList . takeWhile (p . fst) . toList
takeWhileAntitone p = filterWithKey (k _ -> p k)
where <math> is the prefix length. takeWhileL, applied to a predicate p and a sequence xs, returns the longest prefix (possibly empty) of xs of elements that satisfy p.
where <math> is the suffix length. takeWhileR, applied to a predicate p and a sequence xs, returns the longest suffix (possibly empty) of xs of elements that satisfy p. takeWhileR p xs is equivalent to reverse (takeWhileL p (reverse xs)).
Take while a predicate on the elements holds. The user is responsible for ensuring that for all elements j and k in the set, j < k ==> p j >= p k. See note at spanAntitone.
takeWhileAntitone p = fromDistinctAscList . takeWhile p . toList
takeWhileAntitone p = filter p