Permalink
Browse files

got 1.16 working

  • Loading branch information...
1 parent 10c1142 commit a3adae5947aed447f2147f4376b3b996006cab48 Robert Campbell committed Dec 4, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/sicp/chapter1/section2.clj
@@ -105,8 +105,8 @@
(letfn [(square [x] (* x x))]
(defn fast-expt' [b n]
- (loop [n' n a 1]
- (cond (zero? n') a
+ (loop [n' n a b]
+ (cond (= n' 1) a
(even? n') (recur (/ n' 2)
(square a))
:else (recur (dec n')

0 comments on commit a3adae5

Please sign in to comment.