Skip to content
Snippets Groups Projects
Commit fa3ca319 authored by Stephen D's avatar Stephen D
Browse files

readme

parent b1b8f94e
No related branches found
No related tags found
No related merge requests found
# λ++
λ++, or Lambda Plus Plus, is small abstraction layer on top of normal lambda calculus. This project consists of a transpiler to turn λ++ into BLC (binary lambda calculus). This can then be run with a normal BLC interpreter, such as [Justine's](https://justine.lol/lambda/).
## Language
```
$false=λtf.f; # definition
$omega=λa. (a a); # definition
λa.a($omega(λbcde.d(bb)(λf.fce)))$false; # main expression (which uses our definitions)
```
Basically:
- We have comments, yay
- Definitions can be used to abstract things (okay this is a pretty loose definition of abstraction)
- There should be a single expression somewhere, unrelated to the definitions (this is the main expression)
And that's all you get.
## Examples
These were all pretty much stolen from [Justine's site](https://justine.lol/lambda/). Sorry, I'm afraid I don't know what I'm doing.
```bash
$ cargo run -- examples/hello_world.lpp | ./blc
Hello World!
```
```bash
$ { cargo run --release -- examples/sort.lpp; echo; printf "sort this is string please"; } | ./blc
aeeghiiilnoprrsssssttt
```
```bash
{ cargo run -- examples/reverse.lpp; echo; printf "hello world"; } | ./blc
dlrow olleh
```
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment