Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/rricard/lispster

A lisp in javascript. Without the transpilation.
https://github.com/rricard/lispster

Last synced: about 14 hours ago
JSON representation

A lisp in javascript. Without the transpilation.

Awesome Lists containing this project

README

        

# LISPster.js

A lisp in javascript. Without the transpilation.

## Installation

Via npm/browserify:

```sh
npm i --save lispster
```

## Usage

Here is a stupid example while I find something smarter:

```js
var lispster = require("lispster");
var lisp = lispster.lispster;
var lambda = lispster.lambda;
var v = lispster.v;
var letVar = lispster.letVar;

function add(a, b) {
return a + b;
}

function mul(a, b) {
return a * b;
}

var myLispFunction = lisp(
[lambda, ["x", "y", "z"],
[letVar, {added: [add,
[v, "x"],
[v, "y"]]},
[mul, [v, "added"], [v, "z"]]]]
);

myLispFunction(1, 2, 3); // => 9
```

Note that lispster is completely interoperable with JS.

## Test & contribute

You'll need io.js in order to test this library.

After that it's easy:

```sh
git clone [email protected]:rricard/lispster.git
cd lispster
npm i
npm t
```

Once you're able to test, PRs are welcome!

## Author

Robin Ricard

## License

MIT