Skip to content

Commit d4045f7

Browse files
committed
more metadata tweaks
1 parent 0fc0b42 commit d4045f7

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

content/reference/metadata.adoc

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,17 @@ Returns an object of the same type and value as obj, with `(apply f (meta obj) a
7777

7878
Modify or reset the metadata respectively for a namespace/var/ref/agent/atom.
7979

80-
== Metadata Reader Syntax
80+
== Metadata Reader
8181

82-
In addition to with-meta, there is reader support (<<reader#metadata,Metadata Reader>>) for applying metadata to the expression following it at read-time:
82+
In addition to `with-meta`, there is reader support (<<reader#metadata,Metadata Reader>>) for applying metadata to the expression following it at read-time.
8383

84-
* Map: `^{:key value ...}`
85-
* Keyword: `^:key -> `^{:key true}`
86-
* Symbol: `^AClass` or `^package.AClass` -> `{:tag package.AClass}` (also see special <<java_interop#TypeAliases,type aliases>>)
87-
* String: `^"package.AClass"` -> `{:tag package.AClass}`
88-
* Vector: `^[AClass prim _ ...]` -> `{:param-tags [package.AClass prim _ ...]}`
84+
For a metadata value of type:
85+
86+
* Map: `^{:key value ...}` yields itself
87+
* Keyword: `^:key` yields `^{:key true}`
88+
* Symbol: `^AClass` or `^package.AClass` yields `{:tag package.AClass}` (also see special <<java_interop#TypeAliases,type aliases>>)
89+
* String: `^"package.AClass"` yields `{:tag package.AClass}`
90+
* Vector: `^[AClass prim _ ...]` yields `{:param-tags [package.AClass prim _ ...]}`
8991

9092
The `:tag` key is used to hint an objects type to the Clojure compiler. See <<java_interop#typehints,Java Interop: Type Hints>> for more information and a complete list of special type hints.
9193

0 commit comments

Comments
 (0)