Definitions
foldl : {A : Type} → {B : Type} → (B → A → B) → B → List A → BSource#
Left-associative and tail-recursive fold.
map : {A : Type} → {B : Type} → (A → B) → List A → List BSource#
𝒪(𝓃). Maps a function over each element of a List.
filter : {A : Type} → (A → Bool) → List A → List ASource#
𝒪(𝓃). Only keeps the elements for which the given predicate returns true.
replicate : {A : Type} → Nat → A → List ASource#
Returns a List of length n where every element is the given value.
splitAt : {A : Type} → Nat → List A → List A × List ASource#
𝒪(𝓃). splitAt n xs returns a tuple where first element is xs prefix of length n and second element is the remainder of the List.
merge : {A : Type} → Ord A → List A → List A → List ASource#
𝒪(𝓃 + 𝓂). Merges two lists according the given ordering.
partition : {A : Type} → (A → Bool) → List A → List A × List ASource#
𝒪(𝓃). Returns a tuple where the first component has the items that satisfy the predicate and the second component has the elements that don't.
prependToAll : {A : Type} → A → List A → List ASource#
𝒪(𝓃). Inserts the given element before every element in the given List.
intersperse : {A : Type} → A → List A → List ASource#
𝒪(𝓃). Inserts the given element inbetween every two elements in the given List.
zipWith : {A : Type} -> {B : Type} -> {C : Type} -> (A -> B -> C) -> List A -> List B -> List CSource#
𝒪(min(𝓂, 𝓃)). Returns a list containing the results of applying a function to each pair of elements from the input lists.
zip : {A : Type} -> {B : Type} -> List A -> List B -> List (A × B)Source#
𝒪(min(𝓂, 𝓃)). Returns a list of pairs formed from the input lists.
mergeSort : {A : Type} → Ord A → List A → List ASource#
𝒪(𝓃 log 𝓃). Sorts a list of elements in ascending order using the MergeSort algorithm.
terminating quickSort : {A : Type} → Ord A → List A → List ASource#
On average 𝒪(𝓃 log 𝓃), worst case 𝒪(𝓃²). Sorts a list of elements in ascending order using te QuickSort algorithm.