Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/atticus64/lisp-inrs

Interpreter of Lisp in Rust
https://github.com/atticus64/lisp-inrs

compilers interpreter lisp rust

Last synced: 3 months ago
JSON representation

Interpreter of Lisp in Rust

Awesome Lists containing this project

README

        

# Interpreter of Lisp language

> For learning purposes

## Features ☕

* Various Data Types
* [X] String `"Jona"`
* [X] Integer `10`
* [X] Float `3.1416`
* [X] Lambda `(lambda (x) (+ x 1))`
* [X] Boolean `true`

* Built-in Functions
* [X] `+` Add
* [X] `-` Subtract
* [X] `*` Multiply
* [X] `/` Divide
* [X] `^` Pow
* [X] `define` For define variables and functions
* [X] `load` For loading files
* [X] `print` For Debugging

## Examples

* Add two numbers

```lisp
(define add (lambda (x y) (+ x y)))
(add 5)
```

* Circle area

```lisp
(define pi 3.1416)
(define circle-area (lambda (r) (* pi (* r r))))
(circle-area 5)
```

* Print Hello World

```lisp
(print "Hello World")
```