Skip to content

With Vectorsλ︎

Vectors as the simplest data structure in Clojure to work with. They are very similar to an array in other languages, although they have additional qualities in Clojure.


  • can be of any length
  • are indexed so have fast random access
  • can contain any types
  • are immutable

Define a data structure for a simple shopping list with any items you would typically want to buy.

(def shopping-list ["Cerial" "Baked Beans" "Cat food" "Quorn chicken pieces" ])