PersistentVector is an ordered linear structure implementing the inverse of the List signature, (last, initial, conj) in place of (head, tail, cons). Length is O(1). Indexed lookup or update (returning a new immutable instance of Vector) of any element is O(log32n), which is close enough to O(1) as to make no practical difference: a PersistentVector containing 4 billion items can lookup or update any item in at most 7 steps. Ordering is by insertion history. The original idea can be found in [Clojure](http://clojure.org/data_structures).
Instance member | Description |
|
|
|
O(1) for all practical purposes; really O(log32n). Returns a new vector without the last item. If the collection is empty it throws an exception.
|
Full Usage:
this.IsEmpty
Returns: bool
|
|
Full Usage:
this.[arg1]
Parameters:
int
Returns: 'T
|
|
Full Usage:
this.Last
Returns: 'T
|
|
Full Usage:
this.Length
Returns: int
|
|
|
|
|
|
Full Usage:
this.TryLast
Returns: 'T option
|
|
|
O(1) for all practical purposes; really O(log32n). Returns option tuple last element and vector without last item
|
Full Usage:
this.TryUpdate(arg1, arg2)
Parameters:
int
arg1 : 'T
Returns: PersistentVector<'T> option
|
O(1) for all practical purposes; really O(log32n). Returns option vector that contains the given value at the index.
|
|
O(1) for all practical purposes; really O(log32n). Returns tuple last element and vector without last item
|
|
O(1) for all practical purposes; really O(log32n). Returns a new vector that contains the given value at the index.
|
Static member | Description |
|
|