I'm trying to write a function that checks if a character is within a certain hexadecimal range.
I'm trying the code shown below:
(def current \s)
(and (>= current (char 0x20)) (<= current (char 0xD7FF)))
I get the following error:
java.lang.ClassCastException: java.lang.Character cannot be cast to
java.lang.Number (NO_SOURCE_FILE:0)
I assume because the >= operator expects a number, it tries to type cast it.In regular java, I could just do:
(current >= 0x20) && (current <= 0xD7FF)