with-meta

added
1.0

ns
clojure.core

type
function

(with-meta obj m)

Returns an object of the same type and value as obj, with
map m as its metadata.

                user=> (with-meta [1 2 3] {:my "meta"})
[1 2 3]

user=> (meta (with-meta [1 2 3] {:my "meta"}))
{:my "meta"}

            
                ;; the same example above in a simplified way
user=> (def wm (with-meta [1 2 3] {:my "meta"}))
#'user/wm

user=> wm
[1 2 3]

user=> (meta wm)
{:my "meta"}