;; some_ns/internal.clj
(ns some-ns.internal)

(def private-map {:k1 10 :k2 20})
;;------------end-of-file------------

;; some_ns.clj
(ns some-ns
  (:use some-ns.internal))

;; ..functions..
(defn foo
  []
  ;; do something with private-map
  ..)
;;------------end-of-file------------

This is how I have been doing it. But I would love to hear other
ideas.

Regards,
Shantanu

On Oct 11, 12:22 pm, HiHeelHottie <hiheelhot...@gmail.com> wrote:
> I want to define and use a map that is private to a namespace and used
> by several functions in that namespace.  Is the idiomatic way simply
> to def it within the namespace?  Is there another way to hide it?

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