If I define a list in scheme like this
(define list '(when i type I 1 23 4 2))
What’s the type of the thing (car list) returns? And another question is: can I convert it to the string?
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.
In the list shown in the question, the car is the symbol
'when. You can verify it, but first let’s change the name of the list to something else, for avoiding a name collision with the built-inlistprocedure:The
#t(true) in the last line shows that indeed the first element is a symbol. If you need to convert it to a string, simply do this:EDIT :
Answering the question in the comments, this should work: