Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

xenon/lambda-calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

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

No packages published

Languages