Rich mentioned a desire for the "ns-*" functions to accept either a  
symbol or a namespace for arguments where they currently accept a  
namespace.

Using a multimethod that dispatches on the class of that argument is  
one way to do that.

Here's an example:

        (defmulti ns-aliases class)

        (defmethod ns-aliases clojure.lang.Symbol
          [ns]
          (ns-aliases (find-ns ns)))

        (defmethod ns-aliases clojure.lang.Namespace
          [#^clojure.lang.Namespace ns]
          (.getAliases ns))

Is this a good way to accomplish the goal or is it a poor choice for  
some reason?

--Steve


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

Reply via email to