On May 31, 8:14 pm, Joost <jo...@zeekat.nl> wrote: > > True, but that's more a question of the interface provided by def. The > real problem is that if you want to access the vars defined by that > function anywhere else, they need to be defined (if not initialized) > before you can compile the code. Meaning you either have to def those > vars somewhere else (outside of a function) or make sure the function > gets called at least once before any access is mentioned in the code. > > After that, you can re-define the var in any way you like.
Update: some testing indicates that that's not actually what happens. What appears to happen is that (def) is always defining when the code is read/compiled, no matter where in the source the def call is actually places (like in a function definition) it's just unbound until you assign a value to it (by "executing" the def form). -- 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