https://github.com/chicode/lisa-repl
A repl for Lisa
https://github.com/chicode/lisa-repl
Last synced: about 1 month ago
JSON representation
A repl for Lisa
- Host: GitHub
- URL: https://github.com/chicode/lisa-repl
- Owner: chicode
- License: gpl-3.0
- Created: 2019-05-22T03:11:03.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-03T10:28:18.000Z (over 3 years ago)
- Last Synced: 2023-03-04T00:37:04.522Z (over 3 years ago)
- Language: JavaScript
- Homepage:
- Size: 175 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lisa REPL
## Installation
```sh
yarn global add @chicode/lisa-repl
# or
npm i -g @chicode/lisa-repl
```
## Usage
```js
$ lisa-repl
> 9
9
> "hello"
'hello'
> (defunc fib (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))
..... (log i f)
..... f))
> (fib 10)
{ type: 'num', value: 3 } { type: 'num', value: 1 }
{ type: 'num', value: 4 } { type: 'num', value: 2 }
{ type: 'num', value: 5 } { type: 'num', value: 3 }
{ type: 'num', value: 6 } { type: 'num', value: 5 }
{ type: 'num', value: 7 } { type: 'num', value: 8 }
{ type: 'num', value: 8 } { type: 'num', value: 13 }
{ type: 'num', value: 9 } { type: 'num', value: 21 }
{ type: 'num', value: 10 } { type: 'num', value: 34 }
{ type: 'num', value: 11 } { type: 'num', value: 55 }
55
```
## License
This project is licensed under the GPLv3. Please see the [LICENSE](LICENSE) file
for more details.