Skip to content
Example code for Understanding Computation http://computationbook.com/ in Rust
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
Cargo.toml
README.md

README.md

Understanding Computation example code in Rust

The example code of Understanding Computation, an O’Reilly book about computation theory. Re-implement by language Rust.

Build:

Use

cargo build

to build the code.

Table of Content:

Reading guide:

Most of the example code is implemented in testing form, you can find them in mod.rs. To view the test result, use following command:

RUST_TEST_THREADS=1 cargo test -- --nocapture

You can specify keyword in testing name in the command line.

For example:

$ RUST_TEST_THREADS=1 cargo test -- --nocapture ski_swap
running 1 test
test universality_is_everywhere::ski_calculus::tests::test_ski_swap ... swap: S[K[S[I]]][K]
S[K[S[I]]][K][x][y]
K[S[I]][x][K[x]][y]
S[I][K[x]][y]
I[y][K[x][y]]
y[K[x][y]]
y[x]
ok

If you find any bugs or other programs with the code, please open an issue.

You can’t perform that action at this time.