The attr-map adds key-value pairs to the metadata for the function
symbol. The doc for 'defn' makes this clearer.
On Jan 20, 8:02 am, Jacek Generowicz
wrote:
> In Clojure 1.1.0, the documentation states:
>
> clojure.core/defmulti
> ([name docstring? attr-map? dispatch-fn & options])
> Macro
> C
On Jan 20, 1:02 pm, Jacek Generowicz
wrote:
> clojure.core/defmulti
> ([name docstring? attr-map? dispatch-fn & options])
> What is the purpose of the attribute map [...] ?
Answering my own question: It's not specific to multimethods. It's the
metadata, and most def- forms have such an optional
Hi,
Am 20.01.2010 um 14:02 schrieb Jacek Generowicz:
> In Clojure 1.1.0, the documentation states:
>
> 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 op
2010/1/20 Jacek Generowicz :
> What is the purpose of the attribute map?
The attribute map is added to the meta-data of the created. Meta-data
contains info which can be used at runtime or to create documentation
but is not part of the object itself and does not affect equality.
Specifically for d
In Clojure 1.1.0, the documentation states:
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:
:defa