That is, immutable but data sharing with effectively O(1) indexing.
Advertisements. A Vector is a collection of values indexed by contiguous integers. A vector is created by using the vector method in Clojure.
Clojure collections "collect" values into compound values. There are four key Clojure collection types: vectors, lists, sets, and maps. Of those four collection types, vectors and lists are ordered.
Karl Krukow extracted clojure data structures into standalone library, so you can use it without bringing whole clojure to your project. There is also pcollections which has TreePVector implementation (with logarithmic time lookups).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With