Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ebowman/scalisp
Simple lisp interpreter in scala (part of the Gilt Scala Breakfast series)
https://github.com/ebowman/scalisp
Last synced: about 1 month ago
JSON representation
Simple lisp interpreter in scala (part of the Gilt Scala Breakfast series)
- Host: GitHub
- URL: https://github.com/ebowman/scalisp
- Owner: ebowman
- Created: 2012-05-29T15:32:02.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-05-31T13:22:28.000Z (over 12 years ago)
- Last Synced: 2023-04-19T17:17:25.573Z (over 1 year ago)
- Language: Scala
- Size: 121 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
scalisp
=======Simple lisp repl, a project for a Scala Breakfast exercise at Gilt Ireland.
Supports just a tiny subset of some micro lisp: defun, if, +, -, *, /, <, >, <=, >= =.
Example:
$ sbt run
[info] Loading global plugins from /Users/ebowman/.sbt/plugins
[info] Set current project to scalisp (in build file:/Users/ebowman/src/scalisp/)
[info] Running Driver
> (defun fac (x) "" (if (< x 2) x (* x (fac (- x 1)))))
(51 ms) defined Var(fac)
> fac(10)
[1.1] failure: `(' expected but `f' foundfac(10)
^
> (fac 10)
(6 ms) 3628800
> (defun high (x y f) "" (f x y))
(2 ms) defined Var(high)
> (high 2 3 (lamba (x y) (+ x y)))
(2 ms) 5