Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iassasin/math-interpreter
https://github.com/iassasin/math-interpreter
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/iassasin/math-interpreter
- Owner: iassasin
- License: mit
- Created: 2018-09-03T20:00:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-03T20:02:47.000Z (over 6 years ago)
- Last Synced: 2024-11-05T20:13:19.247Z (2 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple math interpreter
Made up just for fun.
No dependencies needed to run. Just use:
```
node index
```Supported operators: `+`, `-`, `*`, `/`, `%`. (No unary `-` and `+`!)
You can use variables:
```
> a = 5
5> b = 3
3> a + b * 2
11
```
Also has functions support:
```
> fn avg a b => (a + b) / 2> avg 1.5 2.5
2> avg avg 1 3 avg 9 11
5
```With great power comes great responsibility.