What do you think of the following style?
(defmacro in-environment [env & body]
`(binding [*months-to-find-tenant* (:months-to-find-tenant env)
*months-in-lease* (:months-in-lease env)
*lease-cycles* (:lease-cycles env)
etc...]
~...@body))
So "env" is a map that would contain the appropriate "constants" that
you need. Whenever you need them you can access them like this:
(in-environment env
(tax-deductible-expenses 1))
That being said, I am not sure if that's the way I would do it. But I
haven't seen the rest of your program and it's possible that this is
perfectly justified.
-Patrick
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en