data ArrayVect : Nat -> Type -> Type A fixed-length vector.
The constructors are the source-level specification. The exported
operations below are transformed during code generation so transformed
producers and consumers use `IArray` as their runtime representation.
Complexity notes on operations describe that transformed runtime path.
Totality: total
Visibility: export
Constructors:
Nil : ArrayVect 0 a (::) : a -> ArrayVect n a -> ArrayVect (S n) a
Hints:
Applicative (ArrayVect n) Eq a => Eq (ArrayVect n a) Foldable (ArrayVect n) Functor (ArrayVect n) Ord a => Ord (ArrayVect n a) Show a => Show (ArrayVect n a)
fromVect : Vect n a -> ArrayVect n a Runtime after transform: O(n). Allocates n array elements.
Totality: total
Visibility: exporttoVect : ArrayVect n a -> Vect n a Runtime after transform: O(n). Allocates an n-element `Vect`.
Totality: total
Visibility: exportfromList : (xs : List a) -> ArrayVect (length xs) a Runtime after transform: O(n). Allocates n array elements.
Totality: total
Visibility: exporttoList : ArrayVect n a -> List a Runtime after transform: O(n). Allocates n list cons cells.
Totality: total
Visibility: exportempty : ArrayVect 0 a Runtime after transform: O(1). Allocates an empty array.
Totality: total
Visibility: exportsingleton : a -> ArrayVect 1 a Runtime after transform: O(1). Allocates a one-element array.
Totality: total
Visibility: exportreplicate : (n : Nat) -> a -> ArrayVect n a Runtime after transform: O(n). Allocates n array elements.
Totality: total
Visibility: exportgenerate : (n : Nat) -> (Fin n -> a) -> ArrayVect n a Runtime after transform: O(n), plus callback cost. Allocates n array elements.
Totality: total
Visibility: exportiterate : (n : Nat) -> (a -> a) -> a -> ArrayVect n a Runtime after transform: O(n), plus callback cost. Allocates n array elements.
Totality: total
Visibility: exportlength : ArrayVect n a -> Nat Runtime after transform: O(1). Allocates nothing.
Totality: total
Visibility: exportnull : ArrayVect n a -> Bool Runtime after transform: O(1). Allocates nothing.
Totality: total
Visibility: exportindex : Fin n -> ArrayVect n a -> a Runtime after transform: O(1). Allocates nothing.
Totality: total
Visibility: exporthead : ArrayVect (S n) a -> a Runtime after transform: O(1). Allocates nothing.
Totality: total
Visibility: exporttail : ArrayVect (S n) a -> ArrayVect n a Runtime after transform: O(n) for a tail of length n.
Allocates n array elements.
Totality: total
Visibility: exportmap : (a -> b) -> ArrayVect n a -> ArrayVect n b Runtime after transform: O(n), plus callback cost. Allocates n array elements.
Totality: total
Visibility: exportmapWithIndex : (Fin n -> a -> b) -> ArrayVect n a -> ArrayVect n b Runtime after transform: O(n), plus callback cost. Allocates n array elements.
Totality: total
Visibility: exportupdateAt : Fin n -> (a -> a) -> ArrayVect n a -> ArrayVect n a Runtime after transform: O(n), plus callback cost.
Copies the whole array and allocates n array elements.
Totality: total
Visibility: exportreplaceAt : Fin n -> a -> ArrayVect n a -> ArrayVect n a Runtime after transform: O(n).
Copies the whole array and allocates n array elements.
Totality: total
Visibility: export(++) : ArrayVect m a -> ArrayVect n a -> ArrayVect (m + n) a Runtime after transform: O(m + n). Allocates m + n array elements.
Totality: total
Visibility: export
Fixity Declaration: infixr operator, level 7take : (m : Nat) -> ArrayVect (m + n) a -> ArrayVect m a Runtime after transform: O(1). Allocates nothing and reuses the array prefix.
Totality: total
Visibility: exportdrop : (m : Nat) -> ArrayVect n a -> ArrayVect (minus n m) a Runtime after transform: O(n `minus` m). Allocates n `minus` m array elements.
Totality: total
Visibility: exportzipWith : (a -> b -> c) -> ArrayVect n a -> ArrayVect n b -> ArrayVect n c Runtime after transform: O(n), plus callback cost. Allocates n array elements.
Totality: total
Visibility: exportfoldr : (a -> acc -> acc) -> acc -> ArrayVect n a -> acc Runtime after transform: O(n), plus callback cost. Allocates nothing.
Totality: total
Visibility: exportfoldl : (acc -> a -> acc) -> acc -> ArrayVect n a -> acc Runtime after transform: O(n), plus callback cost. Allocates nothing.
Totality: total
Visibility: exportfilter : (a -> Bool) -> ArrayVect n a -> (m : Nat ** ArrayVect m a) Runtime after transform: O(n), plus predicate cost.
Allocates an n-slot result buffer; the returned vector length is the number retained.
Totality: total
Visibility: exportmapMaybe : (a -> Maybe b) -> ArrayVect n a -> (m : Nat ** ArrayVect m b) Runtime after transform: O(n), plus callback cost.
Allocates an n-slot result buffer; the returned vector length is the number produced.
Totality: total
Visibility: exportequals : Eq a => ArrayVect n a -> ArrayVect n a -> Bool Runtime after transform: O(n) worst case. Allocates nothing.
Totality: total
Visibility: exportcompare : Ord a => ArrayVect n a -> ArrayVect n a -> Ordering Runtime after transform: O(n) worst case. Allocates nothing.
Totality: total
Visibility: export