I also found it useful to define my own clojure.core. This is because
i wanted swap! and reset! to work on my AtomHash. So i did something
like this, using clj-nstools.
http://code.google.com/p/clj-nstools/
ns+ is sort of slow for large projects, but im sure that can be
improved.

(ns clj.core
  (:refer-clojure :exclude [swap! reset!])
  (:import clojure.lang.APersistentMap java.io.Writer))

(defmulti swap! (fn [a & args] (class a)))
(defmethod swap! clojure.lang.Atom [& args]
  (apply clojure.core/swap! args))
(defmulti reset! (fn [a & args] (class a)))
(defmethod reset! clojure.lang.Atom [& args]
  (apply clojure.core/reset! args))

and then, using ns+ for another ns, we can do at the top of our file

(clojure.core/use 'nstools.ns)
(ns+ my.ns
  (:clone clj.core)
  ....anything else here ....)

Too bad something like ns+ isnt included in clojure core, its quite
useful....

-- 
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