红宝石被改成这个张贴是密码一个Lisp解释器实现,只为学习和娱乐
资 源 简 介
a lisp interpreter implmention on ruby by ssword , just for study & fun
example:
```
(define putlist
(lambda (l)
(map puts l)))
(puts "-----------map------------")
(define map
(lambda (f l)
(if (is_null? l)
null
(cons (f (car l)) (map f (cdr l)))
)
))
(putlist (map (lambda (x) (+ x 5)) (list 1 2 3 4)))
(puts "-------------fib----------")
(define fac
(lambda (n)
(if (= n 0)
1
(* n (fac (- n 1))
))))
(puts (fac 5))
(puts "----------times-------------")
(define times
(lambda (g n)
(if (= 0 n)
1
(do
(g n)
(times g (- n 1))))))
(times puts 5)
```
文 件 列 表
orzlisp
eval.rb
lp.rb
lisp.rb
type.rb
helper.rb
test.scm
env_default.rb
debug.txt
test2.rb
test2.scm