I have a list containing letters.
When I do (car ‘(a)) it gives me the symbol a.
How do I compare it to the character a?
Must I do (eq? (car list) (car ‘(a))?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Symbols and characters are different kinds of data. Fortunately, Scheme is willing to let you convert nearly anything you want. In Racket, for instance:
With all that said, if you’re working on a homework assignment, the instructor almost certainly has an easier path in mind for you.