from the API docs:

(defonce myname "Walter")
; ...
(defonce myname "Schnell")
=> nil
myname
=> Walter

hope this helps ;-)

On 2 Okt., 16:29, 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to