Here is coersion version for Clojure

(defn fib [n]
  (let [n  (int n)]
   (if  (or (zero? n) (= n 1))
       1
      (+  (fib (dec n) )  (fib (- n 2))))))

(time (fib 36))
"Elapsed time 8848.865149"

not much better   and how to type hint for a int  type?





--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to