I use a let at the top of the file to denote things that I want to have as captured and constant.
... you can do things like (let [x 1] (defn foo-that-uses-x [y] (function-here x y))) On Oct 2, 10:29 am, Mark <mjt0...@gmail.com> wrote: > Is there a way to make a declaration in Clojure that cannot be rebound > later? Ideally, I'd like something that fails if I try to do this: > > (def myname "mark") > ; ...more code, elided... > (def myname "Mark") > > Perhaps this is obvious, but I see a lot of discussion of immutable > data structures, but I can't find a way to prevent my bindings from > changing. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---