You're viewing version 1.2.0 of with-meta. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16



  • (with-meta obj m)
Returns an object of the same type and value as obj, with
map m as its metadata.

2 Examples top

  • 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
    [1 2 3]
    user=> (meta wm)
    {:my "meta"}
Log in to add / edit an example.

See Also top

Log in to add a see also.

Comments top

No comments for with-meta. Log in to add a comment.