| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This project implements a Lambda Calculus interpreter in Rust. It supports various operations and Church encodings for numbers and boolean values.
This project includes a REPL for interactive use of the Lambda Calculus interpreter. To start the REPL, run the project's main executable.
The REPL supports the following commands:
To evaluate a Lambda Calculus expression, simply type it into the REPL and press Enter.
The interpreter supports the following instructions and operations:
Basic Lambda Calculus
Church Numerals
Church Booleans
Control Flow
Pairs
Recursion
Here are some examples of how to use the interpreter:
Church Numeral Operations:
(multiply 2 3) (is_zero 0) (pred (succ 5))
Boolean Operations:
(and true false) (or true false) (not true)
Conditional Statement:
(ifthenelse (is_zero 0) 1 2)
Pair Operations:
(pair 1 2) (first (pair 1 2)) (second (pair 1 2))
Factorial using Y Combinator:
(Y (λf. λn. (ifthenelse (is_zero n) 1 (multiply n (f (pred n))))))
| Back | FazBrowse Home | New Git URL |