Skip to main content

Reader

15
  • #""

    Regex literal. #"pattern" compiles to java.util.regex.Pattern at read time.

  • #'

    Var quote. #'foo resolves to the Var object itself.

  • #()

    Anonymous function shorthand. #(+ %1 %2) expands to (fn [x y] (+ x y)).

  • #?

    Reader conditional. #?(:clj expr :cljs expr) for .cljc files.

  • #?@

    Splicing reader conditional.

  • #_

    Discard. #_form causes the reader to ignore the next form.

  • #inst

    Tagged literal for instants. #inst "2024-01-01".

  • #uuid

    Tagged literal for UUIDs.

  • #{}

    Set literal. #{1 2 3} creates a persistent hash set.

  • '

    Quote. 'form expands to (quote form).

  • @

    Deref. @ref expands to (deref ref).

  • ^

    Metadata. ^{:k v} form attaches metadata to the next form.

  • `

    Syntax quote. Resolves symbols to fully-qualified names; allows ~ and ~@.

  • ~

    Unquote. Used inside syntax-quoted forms to evaluate an expression.

  • ~@

    Unquote-splicing. Splices a sequence into the surrounding form.