;; вектор И ЕСТЬ стек: conj добавляет в его КОНЕЦ,
;; peek читает этот конец, а pop убирает его
(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))))
;; вершина 5, затем 5, 3, 1 - последним вошёл, первым вышел
;; осторожно: у СПИСКА те же conj/peek/pop
;; работают с НАЧАЛОМ, а не с концом
(def int-list (-> '() (conj 1) (conj 3) (conj 5)))
;; int-list - это (5 3 1), поэтому peek тоже даёт 5
(println "list is" int-list "- top is" (peek int-list))