That's it! Thanks so much for the help! In what cases is a function turned into a RestFn? variadic clojure or vararg java? I was confused about how clojure is turned into java, but things are a little clearer now.
(make-array) uses java.lang.reflect.Array.newInstance, which is bad as well. I'm going to try and push this interpolation down into the java API. On Tuesday, June 18, 2013 3:00:23 PM UTC-7, John Hume wrote: > > Offhand it looks like the only RestFn you call from filter-link is > clojure.core/format. Have you tried replacing that with something like this? > > (String/format (.get link 1) (doto (make-array String 1) (aset 0 (.get > link 2))) > > I'm not suggesting that's idiomatic, but if it addresses the issue then > you can focus on the difference and look for a happy medium. > > > On Tue, Jun 18, 2013 at 4:10 PM, Tim Jones <timoth...@hp.com <javascript:> > > wrote: > >> >> (defn- filter-link >> "Format lang and cc into the link returned from the product." >> [^List link] >> [(.get link 0) (.get link 1) (.get link 2) (.get link 3) >> (-> (.get link 4) >> (URLDecoder/decode "UTF-8") >> (format (.get link 1) (.get link 2)))]) >> >> (defn link-info >> "Retrieve all link info from a product as a lazy-seq of vectors of >> String. The function >> handles parameter substitution within the URL" >> [^Product p] >> (map filter-link >> (.getAllLinkInfo p @lib {"h_lang" "%1$s" "h_cc" "%2$s"}))) >> > -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.