aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/clojure/clojure/contrib/math.clj2
-rw-r--r--src/main/clojure/clojure/contrib/pprint/cl_format.clj4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/clojure/clojure/contrib/math.clj b/src/main/clojure/clojure/contrib/math.clj
index cef32bf2..56007c71 100644
--- a/src/main/clojure/clojure/contrib/math.clj
+++ b/src/main/clojure/clojure/contrib/math.clj
@@ -104,7 +104,7 @@ Returns an exact number if the base is an exact number and the power is an integ
expt (fn [x y] [(class x) (class y)]))
(defn- expt-int [base pow]
- (loop [n pow, y 1, z base]
+ (loop [n pow, y (num 1), z base]
(let [t (bit-and n 1), n (bit-shift-right n 1)]
(cond
(zero? t) (recur n y (* z z))
diff --git a/src/main/clojure/clojure/contrib/pprint/cl_format.clj b/src/main/clojure/clojure/contrib/pprint/cl_format.clj
index f6e988ca..a7aeca30 100644
--- a/src/main/clojure/clojure/contrib/pprint/cl_format.clj
+++ b/src/main/clojure/clojure/contrib/pprint/cl_format.clj
@@ -834,7 +834,7 @@ Note this should only be used for the last one in the sequence"
args (init-navigator arg-list)]
(loop [count 0
args args
- last-pos -1]
+ last-pos (num -1)]
(if (and (not max-count) (= (:pos args) last-pos) (> count 1))
;; TODO get the offset in here and call format exception
(throw (RuntimeException. "%{ construct not consuming any arguments: Infinite loop!")))
@@ -880,7 +880,7 @@ Note this should only be used for the last one in the sequence"
[param-clause navigator])]
(loop [count 0
navigator navigator
- last-pos -1]
+ last-pos (num -1)]
(if (and (not max-count) (= (:pos navigator) last-pos) (> count 1))
;; TODO get the offset in here and call format exception
(throw (RuntimeException. "%@{ construct not consuming any arguments: Infinite loop!")))