;; a real persistent FIFO queue: conj adds
;; to the tail, peek and pop take from the head
(def int-queue (-> clojure.lang.PersistentQueue/EMPTY
(conj 1) (conj 3) (conj 5)))
;; a queue prints in an unusual way, so show (vec q)
(println "queue is" (vec int-queue))
(println "top is" (peek int-queue))
(println "first is" (peek int-queue))
(println "second is" (peek (pop int-queue)))
(println "third is" (peek (pop (pop int-queue))))
;; top is 1, then 1, 3, 5 - first in, first out