Elena a écrit :
> Hi,
>
> in this code:
>
> (defn main []
>       (check-services))
>
> (defn check-services []
>       1)
>
> if I call slime-eval-defun on "main" before calling it on "check-
> services", Clojure aborts with:
>
> java.lang.Exception: Unable to resolve symbol: check-services in this
> context (NO_SOURCE_FILE:3)
>   [Thrown class clojure.lang.Compiler$CompilerException]
>
> Is it expected?
>   

Yes, it prevents typos to go unnoticed. You can write a forward 
declaration :

(declare check-services); equivalent to (def check-services)

(defn main []
        (check-services))

(defn check-services []
        1)


HTH

Christophe

-- 
Professional: http://cgrand.net/ (fr)
On Clojure: http://clj-me.blogspot.com/ (en)



--~--~---------~--~----~------------~-------~--~----~
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 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to