As a clojure beginner, I am reading clojure code to get myself familiar with Clojure's grammar. Below code snippet is a function in Ring project
(defn- request-context
"Create an UploadContext object from a request map."
{:tag UploadContext}
[request encoding]
(reify UploadContext
(getContentType [this] (get-in request [:headers "content-type"]))
(getContentLength [this] (or (req/content-length request) -1))
(contentLength [this] (or (req/content-length request) -1))
(getCharacterEncoding [this] encoding)
(getInputStream [this] (:body request))))
what is not clear to me is the line
{:tag UploadContext}
if review a clojure function's definition
(defn function-name doc-string? attr-map? [parameter-list]
conditions-map?
(expressions))
I guess (but not sure) the map should be the "attr-map?". But what is a "attr-map?"? I googled and cannot find good explanations.
any examples or links to introduce the "attr-map?" will be appreciated. I also would like to know how the attr-map is used in the code I pasted.