ClojureDocs

Nav

Namespaces

Take the 2025 State of Clojure Survey! Help shape the future of Clojure. Take Survey →

subvec

clojure.core

Available since 1.0 (source)
  • (subvec v start)
  • (subvec v start end)
Returns a persistent vector of the items in vector from
start (inclusive) to end (exclusive).  If end is not supplied,
defaults to (count vector). This operation is O(1) and very fast, as
the resulting vector shares structure with the original and no
trimming is done.