This repository was archived by the owner on Feb 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
xenon/lambda-calc
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
lcalc.ml:
A λ-calculus interpreter in OCaml.
Features:
1) Implements Lazy evaulation and normal order reduction.
2) Implements static binding to prevent incorrect variable substitution.
Would be nice:
Make a parser so we can convert strings of λ-calculus expressions into their
internal representation within the code.
To use:
1) Type your expression in OCaml:
eg: let identityfn = (Abs "x" (Var "x"))
2) Print it using print_expr:
eg: (print_expr identityfn)
-> (λx.x)
3) Reduce expressions to normal form by using reduce:
eg: (reduce (App(identityfn, (Var "y")))
-> (Var "y")
as in: (λx.x)y --(reduces to)--> y
About
A λ-calculus interpreter in OCaml.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published