Closed zackteo closed 3 years ago
Is it me or does the currently is-even? function seem wrong?
is-even?
(defn is-even? [n] (if (= n 0) __ (___ (is-even? (dec n)))))
Should it not be ...
(defn is-even? [n] (if (= (rem n 2) 0) true (not (is-even? (dec n)))))
Whoops mistake. I understand why it works already
Is it me or does the currently
is-even?
function seem wrong?Should it not be ...