How do I convert a string into the corresponding code in PLT Scheme (which does not contain the string->input-port method)? For example, I want to convert this string:
'(1 (0) 1 (0) 0)'
into this list:
'(1 (0) 1 (0) 0)
Is it possible to do this without opening a file?
Scheme has procedure
readfor reading s-expressions from input port and you can convert a string to input stream withstring->input-port. So, you can read a Scheme object from a string withI don’t have Scheme installed, so I only read it from reference and didn’t actually test it.