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} → (A → A → Ordering) → 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.
head : {A : Type} → List A → ASource#
𝒪(1). Partial function that returns the first element of a List.