Skip to content

iskolbin/lusp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lusp

Scheme-like toy language implemented in Lua. Based on the amazing Peter Norvig's page "(How to Write a (Lisp) Interpreter (in Python))" http://www.norvig.com/lispy.html.

Compatible with Lua 5.1, 5.2, LuaJIT.

To run lusp-repl run:

lua "repl.lua"

or run Lua and type:

require('lusp'):repl()

Voila! Now you can start uber-lisp-hacking:)

lusp> (+ 12 30)
42
lusp> (define sqr (lambda (x) (* x x)))
lusp> (sqr 5)
25
lusp> (define reduce (lambda (f l a) (if (null? l) a (reduce f (cdr l) (f (car l) a)))))
lusp> (reduce + (list 1 2 3) 0)
5

About

Scheme-like toy language implemented in Lua

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published