Re: Boxed math in transducers

2015-09-23 Thread Peter Taoussanis
Sorry- that should read "a little better", not "little better" ;-) -- 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 yo

Re: Boxed math in transducers

2015-09-23 Thread Peter Taoussanis
Hey Alex, Not sure I follow. If we deref (volatile! 5), the dereffed val is a number. `(inc @(volatile! 5))` will involve boxed math but `(inc ^long @(volatile! 5))` won't. So, for example: (defn core-take ; As in clojure.core ([n] (fn [rf] (let [nv (volatile! n)] (fn

Re: Boxed math in transducers

2015-09-23 Thread Alex Miller
Given that the counter is held in a volatile (boxed) object, I don't think a hint would help. On Wednesday, September 23, 2015 at 1:14:39 AM UTC-5, Peter Taoussanis wrote: > > Hi all, > > Just noticed some use of boxed math in a couple of the Clojure 1.7 > transducers (e.g. `take`). Would there