3 READ
<- function(str
) {
7 EVAL
<- function(ast
, env
) {
11 PRINT
<- function(exp
) {
15 rep
<- function(str
) {
16 return(PRINT(EVAL(READ(str
), "")))
20 line
<- readline("user> ")
21 if (is
.null(line
)) { cat("\n"); break }
23 cat(rep(line
),"\n", sep
="")
24 }, error
=function(err
) {
25 cat("Error: ", err$message
,"\n", sep
="")