empty : RRBVector a The empty vector. O(1)
Totality: total
Visibility: exportsingleton : a -> RRBVector a A vector with a single element. O(1)
Totality: total
Visibility: exportfromList : List a -> RRBVector a Create a new vector from a list. O(n)
Totality: total
Visibility: exportreplicate : Nat -> a -> RRBVector a Creates a vector of length n with every element set to x. O(log n)
Totality: total
Visibility: exporttoList : RRBVector a -> List a Convert a vector to a list. O(n)
Totality: total
Visibility: exportfoldl : (b -> a -> b) -> b -> RRBVector a -> b- Totality: total
Visibility: export foldr : (a -> b -> b) -> b -> RRBVector a -> b- Totality: total
Visibility: export null : RRBVector a -> Bool Is the vector empty? O(1)
Totality: total
Visibility: exportlength : RRBVector a -> Nat Return the size of a vector. O(1)
Totality: total
Visibility: exportlookup : Nat -> RRBVector a -> Maybe a The element at the index or Nothing if the index is out of range. O(log n)
Totality: total
Visibility: exportindex : Nat -> RRBVector a -> a The element at the index.
Calls 'idris_crash' if the index is out of range. O(log n)
Totality: total
Visibility: export(!?) : RRBVector a -> Nat -> Maybe a A flipped version of lookup. O(log n)
Totality: total
Visibility: export(!!) : RRBVector a -> Nat -> a A flipped version of index. O(log n)
Totality: total
Visibility: exportupdate : Nat -> a -> RRBVector a -> RRBVector a Update the element at the index with a new element.
If the index is out of range, the original vector is returned. O (log n)
Totality: total
Visibility: exportadjust : Nat -> (a -> a) -> RRBVector a -> RRBVector a Adjust the element at the index by applying the function to it.
If the index is out of range, the original vector is returned. O(log n)
Totality: total
Visibility: exporttake : Nat -> RRBVector a -> RRBVector a The first i elements of the vector.
If the vector contains less than or equal to i elements, the whole vector is returned. O(log n)
Totality: total
Visibility: exportdrop : Nat -> RRBVector a -> RRBVector a The vector without the first i elements.
If the vector contains less than or equal to i elements, the empty vector is returned. O(log n)
Totality: total
Visibility: exportsplitAt : Nat -> RRBVector a -> (RRBVector a, RRBVector a) Split the vector at the given index. O(log n)
Totality: total
Visibility: exportviewl : RRBVector a -> Maybe (a, RRBVector a) The first element and the vector without the first element, or 'Nothing' if the vector is empty. O(log n)
Totality: total
Visibility: exportviewr : RRBVector a -> Maybe (RRBVector a, a) The vector without the last element and the last element, or 'Nothing' if the vector is empty. O(log n)
Totality: total
Visibility: exportmap : (a -> b) -> RRBVector a -> RRBVector b Apply the function to every element. O(n)
Totality: total
Visibility: exportreverse : RRBVector a -> RRBVector a Reverse the vector. O(n)
Totality: total
Visibility: exportzip : RRBVector a -> RRBVector b -> RRBVector (a, b) Take two vectors and return a vector of corresponding pairs.
If one input is longer, excess elements are discarded from the right end. O(min(n1,n2))
Totality: total
Visibility: export
Fixity Declaration: infixr operator, level 6(<|) : a -> RRBVector a -> RRBVector a Add an element to the left end of the vector. O(log n)
Totality: total
Visibility: export
Fixity Declarations:
infixr operator, level 0
infixr operator, level 5(|>) : RRBVector a -> a -> RRBVector a Add an element to the right end of the vector. O(log n)
Totality: total
Visibility: export
Fixity Declarations:
infixl operator, level 0
infixl operator, level 5(><) : RRBVector a -> RRBVector a -> RRBVector a Concatenates two vectors. O(log(max(n1,n2)))
Totality: total
Visibility: export
Fixity Declaration: infixr operator, level 5insertAt : Nat -> a -> RRBVector a -> RRBVector a Insert an element at the given index, shifting the rest of the vector over.
If the index is negative, add the element to the left end of the vector.
If the index is bigger than or equal to the length of the vector, add the element to the right end of the vector. O(log n)
Totality: total
Visibility: exportdeleteAt : Nat -> RRBVector a -> RRBVector a Delete the element at the given index.
If the index is out of range, return the original vector. O(log n)
Totality: total
Visibility: exportshowRRBVectorRep : Show a => Show (Tree a) => Show (RRBVector a) => RRBVector a -> String Show the full representation of the vector.
Totality: total
Visibility: export