General lisp reading line

I want to read input from STDIN and just read what it is: if input is a list, then what is read is a list. However, the read-line function always returns a string! For example: in interactive mode:

(read-line) 

I enter:

 ("(define M ::int )" "(define X ::int )") 

This will return me the line:

 "(\"(define M ::int )\" \"(define X ::int )\")" ; 

I want the source list still to be: ("(define M ::int )" "(define X ::int )")

So, how to make reading read in what kind of entry?

+4
source share
3 answers
 (let ((a read))) (eval a)) (+ 2 2 2) => 6 

there is a reason they call READ EVAL PRINT LOOP.

+1
source

Try simply:

(read)

This should work

+13
source

(read-line) returns a line terminated by a new line. (read) is a Lisp parser.

0
source

All Articles