I use it in Clojurescript for a custom tuple type. For small number of items, deftypes are way faster to create and access than PersistentVectors. I use tuple type e.g. for returning multiple values from a function. Implementing #[] allowed me to have a compact syntax for creating and destructuring such tuples.
(defn foo [a b] #[(+ a b) (- a b) (* a b)]) (defn foo [] (let [#[plus minus times] (foo 1 2)] (str "bla bla" plus "blaah" minus))) JW On Friday, December 28, 2012 11:15:52 PM UTC+1, vemv wrote: > > I was just wondering - given that we have the #() and #{} literals, why > not a #[] as well? Queues look like a good fit. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en