Idris2Doc : Libraries.Data.List.Extra

Libraries.Data.List.Extra

(source)

Reexports

importpublic Data.List

Definitions

elemAt : Lista->Nat->Maybea
  Fetches the element at a given position.
Returns `Nothing` if the position beyond the list's end.

Totality: total
Visibility: public export
findBy : (a->Maybeb) ->Lista->Maybeb
Totality: total
Visibility: export
findBy' : (a->Bool) ->Lista-> (Lista, (Maybea, Lista))
Totality: total
Visibility: export
findAndDeleteBy : (a->Bool) ->Lista->Maybe (a, Lista)
  Returns first element that matches the predicate and the list without it

Totality: total
Visibility: export
diffBy : (a->a->Bool) ->Lista->Lista->Lista
  Compute the difference of two lists by the given predicate.
Lists are treated as bags.

Totality: total
Visibility: export
dedup : Eqa=>Lista->Lista
  Remove adjacent duplicates

Totality: total
Visibility: export
sortedNub : Orda=>Lista->Lista
  O(n * log(n)). Sort a list and remove duplicates

Totality: total
Visibility: export
lengthDistributesOverAppend : (xs : Lista) -> (ys : Lista) ->length (xs++ys) =lengthxs+lengthys
Totality: total
Visibility: export