Idris2Doc : Data.Seq.Sized

Data.Seq.Sized

(source)
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 sequence, 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
  The empty sequence. O(1)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Totality: total
Visibility: export