What are the ways to use ^ and how can I get more information about this?

found this on a blog: (def x ^{:type ::my-class} {})

obviously it adds metadata to the map

user=> (meta x)
{:type :user/my-class}
  • what else is doing ^? Does he have any other uses? can it be used as a getter for metadata (and not just for setting metadata)?

  • How can I find out information about some shortcuts in clojure? e.g. ^, ', `, ~. is it possible to get this from repl?

+5
source share
1 answer

See the documentation for the Clojure reader, in particular the macro symbol section:

Reader

Edit: in the metadata records : -)

+8
source

All Articles