3 ms·
I'm not a Clojure expert, so I can't directly address that, but from the little that I know of Clojure though, I think you can do that by binding a function to
by itistoday 17y ago
I'm not a Clojure expert, so I can't directly address that, but from the little that I know of Clojure though, I think you can do that by binding a function to a var, and then changing the binding of the var. (Can any Clojure experts exlaborate?)
Regardless, every Lisp that I am able to comment on (newLISP, elisp, Scheme, CL) can do that easily, so I doubt that Clojure would have difficulty with this.
- jshen 17y agoIt does have difficulty with this, check the mailing list. Just because something using s-expressions doesn't mean you can override functions in a namespace. http://groups.google.com/group/clojure/browse_thread/thread/95c8ab4f60945451/09f5f27cb24ba0ae?q=dependency+injection&lnk=ol& http://groups.google.com/group/clojure/browse_thread/thread/...;
- itistoday 17y agoThanks for that interesting thread! I do know though that newLISP can do this easily with a simple 'set' call.