blc 0.7.0

An implementation of the binary lambda calculus.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use blc::encoding::binary::decompress;
use blc::execution::Input;
use blc::*;

#[test]
// program code from https://tromp.github.io/cl/Binary_lambda_calculus.html#A_quine
fn repeat() {
    let code_compressed = [0x16, 0x46, 0x80, 0x05, 0xbc, 0xbc, 0xfd, 0xf6, 0x80];
    let code_blc = decompress(&code_compressed);

    assert_eq!(run(&code_blc, Input::Bytes(b"hurr")).unwrap(), "hurrhurr");
}