Added more content to README.md
This commit is contained in:
parent
6994025cfb
commit
38e55f5258
73
README.md
73
README.md
|
@ -1,24 +1,81 @@
|
||||||
# Cherry Lisp
|
# Cherry Lisp
|
||||||
A tiny and lazy lisp.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
/\
|
/\
|
||||||
| \
|
| \ A tiny, curried and lazy Lisp.
|
||||||
@ @
|
@ @
|
||||||
|
|
||||||
cherry> (+ 2 3 4)
|
|
||||||
9
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Instructions
|
## Curried? Lazy?
|
||||||
|
|
||||||
|
Currying consists in convert **one function** that takes **multiple arguments** into **multiple functions** that each take a **single argument**.
|
||||||
|
|
||||||
|
*WIP*
|
||||||
|
|
||||||
|
Lazyness is when an expression is only evaluated **when is necessary**.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Interpreted
|
||||||
|
- Dynamic typed
|
||||||
|
- Functional (impure)
|
||||||
|
- Curried
|
||||||
|
- Lazy evaluation
|
||||||
|
- It's a Lisp
|
||||||
|
|
||||||
|
## Inspiration
|
||||||
|
|
||||||
|
This language is being created for fun.
|
||||||
|
|
||||||
|
It takes inspiration of some features of *Haskell* (like currification and lazy evaluation) and the syntax of *Lisp*.
|
||||||
|
|
||||||
|
## A small taste
|
||||||
|
|
||||||
|
``` lisp
|
||||||
|
cherry> (set! x 10)
|
||||||
|
nil
|
||||||
|
cherry> x
|
||||||
|
10
|
||||||
|
cherry> (const 3 6)
|
||||||
|
3
|
||||||
|
cherry> (set! always-seven (const 7))
|
||||||
|
nil
|
||||||
|
cherry> always-seven
|
||||||
|
#[lambda y x]
|
||||||
|
cherry> (always-seven 1)
|
||||||
|
7
|
||||||
|
cherry> (always-seven 8)
|
||||||
|
7
|
||||||
|
```
|
||||||
|
|
||||||
|
## Download and build instructions
|
||||||
|
|
||||||
|
Install the *stack* build tool. On *Debian* based systems, run (as root):
|
||||||
|
|
||||||
```
|
```
|
||||||
# apt install haskell-stack
|
# apt install haskell-stack
|
||||||
|
```
|
||||||
|
|
||||||
|
Clone the repo:
|
||||||
|
|
||||||
|
```
|
||||||
$ git clone https://git.fai.su/Suguivy/cherry-lisp
|
$ git clone https://git.fai.su/Suguivy/cherry-lisp
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
Compile it:
|
||||||
|
|
||||||
|
```
|
||||||
$ cd cherry-lisp
|
$ cd cherry-lisp
|
||||||
# stack upgrade
|
$ stack upgrade
|
||||||
$ stack build
|
$ stack build
|
||||||
|
```
|
||||||
|
|
||||||
|
Install and execute it:
|
||||||
|
|
||||||
|
```
|
||||||
$ stack install
|
$ stack install
|
||||||
$ cherry
|
$ cherry
|
||||||
```
|
```
|
||||||
|
|
||||||
Work in progress...
|
*Work in progress...*
|
||||||
|
|
Loading…
Reference in New Issue