Reputation: 329
How can I represent a char (character) in clojure?
Also I would like an example to test it using the char? function
(println (char? 1))
(println (char? (char 'a')))
Upvotes: 3
Views: 116
Reputation: 236004
Use a backslash for representing an individual character. For instance:
(char? \a)
returns true
Upvotes: 3