Hi Jonathan, welcome to Clojure.

Yes, you have to define or declare things before you refer to them.
It sounds like you already know how to define things.  To declare
things, use the declare macro.

Cheers,
Bill Smith

On Feb 22, 12:05 am, Jonathan Mitchem <jmitc...@gmail.com> wrote:
> I'm new to Lisps in general, and very new to Clojure.
>
> When I was trying out CL, I could put my "defun/defn"s in any order in
> the file, and it would load and run fine in the REPL.  However, in
> Clojure, it seems to be much more C/C++-like and I have to define
> things before I use them in other defns.
>
> Is this... correct?  Or is it just a limitation of the IDEs I've been
> trying out?
>
> E.g., it seems like I have to define "sum" before I can define
> "average".

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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