Hi,

I tried to use definitions which call each other, like so:

(defn is-odd? [n]
      (if (= n 0)
          false
          (is-even? (- n 1))))

(defn is-even? [n]
      (if (= n 0)
          true
          (is-odd? (- n 1))))

but obviously Clojure rejects this, saying:
   Exception in thread "main" java.lang.Exception: Unable to resolve symbol:
is-even? in this context
which refers to "is-even?" in the definition of is-odd?

Since I am very new to Clojure I may have missed a language construct to
resolve this issue :-)

Thx,
   Arie

--~--~---------~--~----~------------~-------~--~----~
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