0

In https://stackoverflow.com/a/2495105/261952 somebody claims it works like this:

(-> (clojure.lang.PersistentQueue/EMPTY)
      (conj 1 2 3)
      pop)
(2 3)

However when I try this in my REPL, I get this result:

=> #object[clojure.lang.PersistentQueue 0x11f5966 "clojure.lang.PersistentQueue@402"]

Since that post is 7 years old, behaviour may have changed. How cat I get it working today (Clojure 1.8)?

Community
  • 1
  • 1
didi_X8
  • 5,018
  • 10
  • 42
  • 46

1 Answers1

3

It still works. Add seq to the threading to see what there is:

(-> (clojure.lang.PersistentQueue/EMPTY)
    (conj 1 2 3)
    pop
    seq)
;(2 3)
Thumbnail
  • 13,293
  • 2
  • 29
  • 37