You can use the built-in function readby turning the string into an "input port" (abstraction of a file open for reading):
(read (open-input-string "(1 2 3 4)")) ;; evaluates to (1 2 3 4)
This works in both Guile and Racket. Depending on the implementation of the circuit, you may also need to import the SRFI-6 module .
source
share