4 ms·
'Homoiconic' might want to require that the code and the code as data have the same internal (internal code and internal data) AND external representation (exte
by lispm 12y ago
'Homoiconic' might want to require that the code and the code as data have the same internal (internal code and internal data) AND external representation (external code and external data). Also it would be really good if we don't need special AST data structures.
Thus we can read source code and then printing it makes it look the same (usually with some delta).
CL-USER 6 > (let (program)
(format t "~%Enter a program: ")
(finish-output)
(setq program (read))
(format t "~%~%The entered program is: ~a" program)
(finish-output)
(format t "~%~%The result is: ~a~%~%" (eval program))
(values))
Enter a program: (+ 1 2) ; user input of a program
The entered program is: (+ 1 2) ; program output
The result is: 3