data Seq : Nat -> Type -> Type
A two-end finite sequences, with length in its type.
Totality: total
Visibility: export
Constructor: MkSeq : FingerTree (Elem e) -> Seq n e
Hints:
Applicative (Seq n)
Eq a => Eq (Seq n a)
Foldable (Seq n)
Functor (Seq n)
Ord a => Ord (Seq n a)
Show a => Show (Seq n a)
Sized (Seq n a)
Traversable (Seq n)
Zippable (Seq n)
empty : Seq 0 e
O(1). The empty sequence.
Totality: total
Visibility: exportsingleton : e -> Seq 1 e
O(1). A singleton sequence.
Totality: total
Visibility: exportreplicate : (n : Nat) -> e -> Seq n e
O(n). A sequence of length n with a the value of every element.
Totality: total
Visibility: exportlength : Seq n a -> Nat
O(1). The number of elements in the sequence.
Totality: total
Visibility: exportreverse : Seq n a -> Seq n a
O(n). Reverse the sequence.
Totality: total
Visibility: exportcons : e -> Seq n e -> Seq (S n) e
O(1). Add an element to the left end of a sequence.
Totality: total
Visibility: export
Fixity Declaration: infixr operator, level 5snoc : Seq n e -> e -> Seq (S n) e
O(1). Add an element to the right end of a sequence.
Totality: total
Visibility: export
Fixity Declaration: infixl operator, level 5(++) : Seq m e -> Seq n e -> Seq (m + n) e
O(log(min(m, n))). Concatenate two sequences.
Totality: total
Visibility: export
Fixity Declaration: infixr operator, level 7viewl : Seq (S n) a -> (a, Seq n a)
O(1). View from the left of the sequence.
Totality: total
Visibility: exporthead : Seq (S n) a -> a
O(1). The first element of the sequence.
Totality: total
Visibility: exporttail : Seq (S n) a -> Seq n a
O(1). The elements after the head of the sequence.
Totality: total
Visibility: exportviewr : Seq (S n) a -> (Seq n a, a)
O(1). View from the right of the sequence.
Totality: total
Visibility: exportinit : Seq (S n) a -> Seq n a
O(1). The elements before the last element of the sequence.
Totality: total
Visibility: exportlast : Seq (S n) a -> a
O(1). The last element of the sequence.
Totality: total
Visibility: exportfromVect : Vect n a -> Seq n a
O(n). Turn a vector into a sequence.
Totality: total
Visibility: exportfromList : (xs : List a) -> Seq (length xs) a
O(n). Turn a list into a sequence.
Totality: total
Visibility: exporttoVect : Seq n a -> Vect n a
O(n). Turn a sequence into a vector.
Totality: total
Visibility: exportindex : (i : Nat) -> Seq n a -> LT i n => a
O(log(min(i, n-i))). The element at the specified position.
Totality: total
Visibility: exportindex' : Seq n a -> Fin n -> a
O(log(min(i, n-i))). The element at the specified position.
Use Fin n to index instead.
Totality: total
Visibility: exportadjust : (a -> a) -> (i : Nat) -> Seq n a -> LT i n => Seq n a
O(log(min(i, n-i))). Update the element at the specified position.
Totality: total
Visibility: exportupdate : (i : Nat) -> a -> Seq n a -> LT i n => Seq n a
O(log(min(i, n-i))). Replace the element at the specified position.
Totality: total
Visibility: exportsplitAt : (i : Nat) -> Seq (i + j) a -> (Seq i a, Seq j a)
O(log(min(i, n-i))). Split a sequence at a given position.
Totality: total
Visibility: exporttake : (i : Nat) -> Seq (i + j) a -> Seq i a
O(log(min(i, n-i))). The first i elements of a sequence.
Totality: total
Visibility: exportdrop : (i : Nat) -> Seq (i + j) a -> Seq j a
O(log(min(i, n-i))). Elements of a sequence after the first i.
Totality: total
Visibility: exportshow' : Show a => Seq n a -> String
Dump the internal structure of the finger tree.
Totality: total
Visibility: export