Skip to content

RainMark/lispoo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lispoo

Code Oops Lisp Interpreter

build

$ ./build.sh

example

(progn
  (define abc (lambda (a b c) (+ a (+ b c))))
  (set! x (abc 1 2 3))
  (message x)
  (progn (+ 1.2 3.9) (define plus (lambda (a b) (+ a b))) (message (plus 9 9)))
  )
$ ./lispoo example/lambda.lisp
8
18
(progn
  (set! i 3)
  (while i (progn (message i) (set! i (+ i -1))))
  (progn (set! x 0) (message (if x 1 2)))
  (message (progn (+ 1 1) (+ 2 2)))
  )
$ ./lispoo example/loop.lisp
3
2
1
2
4
(progn
  (define test (lambda (x) x))
  (if (test (quote (+ 1 -1)))
      (message (quote true))
    (message (quote false))
    )
  (message (quote (+ 1 2)))
  )
$ ./lispoo example/quote.lisp
false
(+ 1 2)

More Examples