How do I search for special characters in Clojure?
Asked Answered
V

2

5

Clojure uses a number of special characters such as

  • ^String
  • #(xyz ...)
  • %&
  • #_(some form here)
  • >!

and many more. How can I search for documentation for these special characters, given that Google et al mostly ignore special characters in web pages and search strings?

Victual answered 22/5, 2018 at 4:55 Comment(0)
V
9

This question and others have raised an important topic: it can often be difficult and frustrating to find documentation on special characters used in Clojure source code.

The first place to look is the Clojure docs themselves. There is even a special page devoted to this topic:

Many of the special characters are known as Reader Literals, which also have a documentation page:

You can also find hints regarding special chars & their usage on:

Finally, the search engine SymbolHound.com can search for special symbols that Google & others ignore. For example, consider this Clojure code:

(defn lines
  "Given an open reader, return a lazy sequence of lines"
  [^java.io.BufferedReader reader]
  (take-while identity (repeatedly #(.readLine reader))))

How could we search for the meaning of ^java.io.BufferedReader on the 3rd line? If we go to SymbolHound and use the search string clojure ^ we get back:


270 results found for clojure ^

and many more answers.

Victual answered 22/5, 2018 at 5:11 Comment(1)
SymbolHound.com does not exist anymore.Presentationism
O
1

They're all described here:

https://clojure.org/guides/weird_characters

You can also add more by contributing:

https://clojure.org/community/contributing_site

Ordzhonikidze answered 22/5, 2018 at 5:4 Comment(1)
You were too fast for me. I was trying to post a list of answers + SymbolHound.comVictual

© 2022 - 2024 — McMap. All rights reserved.