A toy Lisp interpreter in R
You can install lisprr from github with:
# install.packages("devtools")
devtools::install_github("igjit/lisprr")
lisprr::evaluate("(+ 1 2)")
#> [1] 3
lisprr::evaluate("(plot (: 1 10))")
lisprr::translate("(+ 1 2)")
#> 1 + 2
lisprr::translate("(define (add2 x) (+ x 2))")
#> add2 <- function(x = NULL) {
#> x + 2
#> }
> lisprr::repl()
lisprr> (: 1 10)
1 2 3 4 5 6 7 8 9 10
lisprr> (define (add2 x) (+ x 2))
#<closure>
lisprr> (add2 40)
42
lisprr> (plot iris)
lisprr> q
bye.
>