#queue [] ;; create an empty clojure.lang.PersistentQueue
#queue [1 2 3 4]
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)
Personally I much prefer the queue-fish representation:
user=> (conj (conj clojure.lang.PersistentQueue/EMPTY 12) 9)
<-(12 9)-<
-Phil
Now that we have reader literals, would it be useful to have a
built-in reader literal for this type?
#queue [] ;; create an empty clojure.lang.PersistentQueue
#queue [1 2 3 4]
Indeed. And I may well do so for my code. But it seems that
PersistentQueue is common enough that a standard, built-in literal
syntax might be warranted?
--
You received this message because you are subscribed to the Google Groups "Clojure Dev" group.
To post to this group, send email to cloju...@googlegroups.com.
To unsubscribe from this group, send email to clojure-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/clojure-dev?hl=en.
Are there reader literals in the Clojurescript reader yet?
Should the queue literal evaluate its arguments? The implications of this are illustrated below:
;; non-eval case #queue [1 2 (+ 1 2)] ;=> #queue [1 2 (+ 1 2)] ;; eval case #queue [1 2 (+ 1 2)] ;=> #queue [1 2 3]