Rに慣れるために、Lispインタプリタを書いてみました。 元ねたはPeter Norvigの (How to Write a (Lisp) Interpreter (in Python)) (日本語訳: ((Pythonで) 書く (Lisp) インタプリタ))です。 コード 遊び方 コードを取ってきます。 $ git clone https://gist.github.com/5598108.git Rインタプリタを起動してコードを読み込ませます。 repl() を実行するとLispの対話式インタプリタが起動します。 $ cd 5598108/ $ R -q > source("lisp.R") > repl() lisp.R> (+ 1 2) 3 lisp.R> (define l (list 1 2 3)) (1 2 3) lisp.R> (car l) 1 lisp.R> (cdr