Idris2Doc : Data.Seq.Sized

Data.Seq.Sized

General purpose two-end finite sequences,
with length in its type.

This is implemented by finger tree.

Reexports

importpublic Data.Fin
importpublic Data.Nat
importpublic Data.Vect
importpublic Data.Zippable

Definitions

dataSeq : Nat->Type->Type
  A two-end finite sequences, with length in its type.

Totality: total
Visibility: export
Constructor: 
MkSeq : FingerTree (Eleme) ->Seqne

Hints:
Applicative (Seqn)
Eqa=>Eq (Seqna)
Foldable (Seqn)
Functor (Seqn)
Orda=>Ord (Seqna)
Showa=>Show (Seqna)
Sized (Seqna)
Traversable (Seqn)
Zippable (Seqn)
empty : Seq0e
  O(1). The empty sequence.

Totality: total
Visibility: export
singleton : e->Seq1e
  O(1). A singleton sequence.

Totality: total
Visibility: export
replicate : (n : Nat) ->e->Seqne
  O(n). A sequence of length n with a the value of every element.

Totality: total
Visibility: export
length : Seqna->Nat
  O(1). The number of elements in the sequence.

Totality: total
Visibility: export
reverse : Seqna->Seqna
  O(n). Reverse the sequence.

Totality: total
Visibility: export
cons : e->Seqne->Seq (Sn) e
  O(1). Add an element to the left end of a sequence.

Totality: total
Visibility: export
Fixity Declaration: infixr operator, level 5
snoc : Seqne->e->Seq (Sn) e
  O(1). Add an element to the right end of a sequence.

Totality: total
Visibility: export
Fixity Declaration: infixl operator, level 5
(++) : Seqme->Seqne->Seq (m+n) e
  O(log(min(m, n))). Concatenate two sequences.

Totality: total
Visibility: export
Fixity Declaration: infixr operator, level 7
viewl : Seq (Sn) a-> (a, Seqna)
  O(1). View from the left of the sequence.

Totality: total
Visibility: export
head : Seq (Sn) a->a
  O(1). The first element of the sequence.

Totality: total
Visibility: export
tail : Seq (Sn) a->Seqna
  O(1). The elements after the head of the sequence.

Totality: total
Visibility: export
viewr : Seq (Sn) a-> (Seqna, a)
  O(1). View from the right of the sequence.

Totality: total
Visibility: export
init : Seq (Sn) a->Seqna
  O(1). The elements before the last element of the sequence.

Totality: total
Visibility: export
last : Seq (Sn) a->a
  O(1). The last element of the sequence.

Totality: total
Visibility: export
fromVect : Vectna->Seqna
  O(n). Turn a vector into a sequence.

Totality: total
Visibility: export
fromList : (xs : Lista) ->Seq (lengthxs) a
  O(n). Turn a list into a sequence.

Totality: total
Visibility: export
toVect : Seqna->Vectna
  O(n). Turn a sequence into a vector.

Totality: total
Visibility: export
index : (i : Nat) ->Seqna->LTin=>a
  O(log(min(i, n-i))). The element at the specified position.

Totality: total
Visibility: export
index' : Seqna->Finn->a
  O(log(min(i, n-i))). The element at the specified position.
Use Fin n to index instead.

Totality: total
Visibility: export
adjust : (a->a) -> (i : Nat) ->Seqna->LTin=>Seqna
  O(log(min(i, n-i))). Update the element at the specified position.

Totality: total
Visibility: export
update : (i : Nat) ->a->Seqna->LTin=>Seqna
  O(log(min(i, n-i))). Replace the element at the specified position.

Totality: total
Visibility: export
splitAt : (i : Nat) ->Seq (i+j) a-> (Seqia, Seqja)
  O(log(min(i, n-i))). Split a sequence at a given position.

Totality: total
Visibility: export
take : (i : Nat) ->Seq (i+j) a->Seqia
  O(log(min(i, n-i))). The first i elements of a sequence.

Totality: total
Visibility: export
drop : (i : Nat) ->Seq (i+j) a->Seqja
  O(log(min(i, n-i))). Elements of a sequence after the first i.

Totality: total
Visibility: export
show' : Showa=>Seqna->String
  Dump the internal structure of the finger tree.

Totality: total
Visibility: export