Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chicode/lisa
A Lisp dialect designed for codingworkshops
https://github.com/chicode/lisa
elm lisp lisp-dialect parser
Last synced: about 1 month ago
JSON representation
A Lisp dialect designed for codingworkshops
- Host: GitHub
- URL: https://github.com/chicode/lisa
- Owner: chicode
- License: gpl-3.0
- Created: 2019-04-24T05:03:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-01T14:33:13.000Z (over 5 years ago)
- Last Synced: 2024-05-18T20:47:48.200Z (7 months ago)
- Topics: elm, lisp, lisp-dialect, parser
- Language: Elm
- Homepage:
- Size: 125 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-elm-pltd - lisa - A Lisp dialect designed for coding workshops (Languages / Interpreters)
README
# Lisa
> A Lisp dialect designed for codingworkshops
## Example
```lisp
(defunc fib-recurse (n)
(var a 0) (var b 1) (var f 1)
(defunc calc-fib (i)
(if (<= i n)
(do
(set f (+ a b))
(set a b)
(set b f)
(calc-fib (+ i 1)))
f))
(calc-fib 2))
(defunc fib-while (n)
(var a 0) (var b 1) (var f 1)
(var i 2)
(while (<= i n)
(set f (+ a b))
(set a b)
(set b f)
(set i (+ i 1))
f))
(= (fib-recurse 10) (fib-while 10) 55)
```## Running examples
```sh
cd examples
elm reactor
```Navigate to http://localhost:8000/Main.elm
## Usage
```elm
import LisadoParse source =
case Lisa.processString source of
Ok program ->
-- do something with programErr err ->
Err err
```## License
This project is licensed under the GPL v3. See the [LICENSE](LICENSE) file for
more details.