 ; -----------------------------------------------
 
 (defn fibo-local-vars
-  [n]
+  [^long n]
   (with-local-vars [curr 0N
                     next 1N
                     iter n]

    (run-bench (fibo-volatile n))
    (run-bench (fibo-with-type n))
    (run-bench (fibo-with-java n))
    #_(perf/quick-bench (fibo-lazy-cat n))
    ))

                   ^:unsynchronized-mutable next]
  Advance
  (advance [_ n]
    (loop [^long n n]
      (if-not (zero? n)
        (let [nnext (+ curr next)]
          (set! curr next)
          (set! next nnext)
          (recur (dec n)))))
    curr))

(defn fibo-with-type
  [^long n]
  (advance (FiboType. 0N 1N) n))

; -----------------------------------------------

(defn fibo-with-java
  [^long n]
  (javaalg.algorithms.PerfFiboJava/fibs n))

(defn fibo-recur-java-bigint
  [^long n]
  (loop [curr (BigInteger/valueOf 0)
         next (BigInteger/valueOf 1)
         n n]
    (if-not (zero? n)
      (recur next (.add curr next) (dec n))
      curr)))

; -----------------------------------------------

