In REPL, you can use the doc function to get function arguments and (most of the time) an explanation of the parameters. As for ClojureScript, these two functions are macros, which means that they expand at compile time and should behave just like normal Clojure. That is, while ClojureScript can process the code generated by the macro.
user=> (doc defmulti) ------------------------- clojure.core/defmulti ([name docstring? attr-map? dispatch-fn & options]) Macro Creates a new multimethod with the associated dispatch function. The docstring and attribute-map are optional. Options are key-value pairs and may be one of: :default the default dispatch value, defaults to :default :hierarchy the isa? hierarchy to use for dispatching defaults to the global hierarchy nil user=> (doc defmethod) ------------------------- clojure.core/defmethod ([multifn dispatch-val & fn-tail]) Macro Creates and installs a new method of multimethod associated with dispatch-value. nil
Jeremy
source share