clojure.core/with-meta¶
Returns an object of the same type and value as obj, with map m as its metadata.
Examples¶
Note by beoliver¶
The Clojure documentation states that "metadata does not impact equality (or hash codes). Two objects that differ only in metadata are equal." One should be aware that while a function can be compared to itself:
testing equality> (= foo foo)
true
> (= (with-meta foo {:hello :world}) foo)
false
> (= (with-meta foo {}) foo)
false
See also¶
Content from the matching ClojureDocs page, with authors credited on each contribution.