title: How to cast a character to int in Clojure?
body: <p>How to cast a character to int in Clojure?</p>
  
  <p>I am trying to write a rot 13 in clojure, so I need to have something to cast my char to int. I found something called (int), so I put:</p>
  
  <pre><code>(int a)
  </code></pre>
  
  <p>Get: CompilerException java.lang.RuntimeException: Unable to resolve symbol: a in this context, compiling:(NO_SOURCE_PATH:13:1) </p>
  
  <p>Then I put:</p>
  
  <pre><code>(int 'a)
  </code></pre>
  
  <p>Get: ClassCastException clojure.lang.Symbol cannot be cast to `java.lang.Character  clojure.lang.RT.intCast (RT.java:1087)</p>
  
  <p>Then: </p>
  
  <pre><code>(rot13 ''a')
  </code></pre>
  
  <p>Get: ClassCastException clojure.lang.PersistentList cannot be cast to java.lang.Character  clojure.lang.RT.intCast (RT.java:1087)</p>
  
  <p>And:</p>
  
  <pre><code>(rot13 "a")
  </code></pre>
  
  <p>Get: </p>
  
  <pre><code>ClassCastException java.lang.String cannot be cast to java.lang.Character  clojure.lang.RT.intCast (RT.java:1087)
  </code></pre>
  
  <p>So what is the right way to do it?</p>
  
  <p>btw, I always get confused with all these clojure syntax. But I can never find any source only help me with my problem. Any suggestions? Thank you!!</p>