Hi Gunnar, The only thing I fixed is related to recur (whose type was null and thus not unifiable with a primitive type).
Concerning your fib2, I think the proble comes from the "then" being a long (1) and the else a double. Thus boxing is required to return either a long or double (well a Long and a Double). I think if you change fib2 to always return double you'll see the boxing ops go away: (defn fib2 ^double [^double n] (if (<= n 1) 1.0 (+ (fib2 (dec n)) (fib2 (- n 2))))) Concerning multiply-and-square, since my patch deals with correctly typing recur in a primitive context, it is solved: 35: dstore_1 36: goto 0 39: goto 44 42: pop 43: dload_1 44: dreturn Christophe On Wed, Nov 21, 2012 at 1:34 PM, Gunnar Völkel < gunnar.voel...@googlemail.com> wrote: > (defn fib ^long [^long n] > (if (<= n 1) 1 (+ (fib (dec n)) (fib (- n 2))))) > -- Professional: http://cgrand.net/ (fr) On Clojure: http://clj-me.cgrand.net/ (en) -- 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