A related problem occurs when you separate your code into multiple namespaces. You can't create cyclic links with use or require. There's a case to be made for avoiding that situation, but the solution clojure provides when you need it is to import the vars using ns-resolve as in (def myfn (ns-resolve 'com.foo.bar.mylib 'myfn))
On Tue, Feb 22, 2011 at 1: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 -- 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