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.
Vectors
- 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" ])
当前内容版权归 practicalli 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 practicalli .