数组和集合

;; a vector IS a stack: conj adds to its END,
;; peek reads that end and pop removes it
(def int-stack (-> [] (conj 1(conj 3(conj 5)))
;; int-stack is [1 3 5]

(println "top is" (peek int-stack))
(println "first is" (peek int-stack))
(println "second is" (peek (pop int-stack)))
(println "third is" (peek (pop (pop int-stack))))
;; top is 5, then 5, 3, 1 - last in, first out

;; careful: for a LIST the same conj/peek/pop
;; work with the FRONT, not with the end
(def int-list (-> '() (conj 1(conj 3(conj 5)))
;; int-list is (5 3 1), so peek is 5 as well
(println "list is" int-list "- top is" (peek int-list))