Sunday, August 06, 2006

Lambda calculus interpreter in Factor

Matthew Willis has implemented a lambda calculus interpreter in Factor. You can enter and evaluate lambda expressions. To start the evaluator, do:
  "lambda" require
USE: lambda
lint-boot lint

Now try evaluating some expressions. First, an identity function:
  ((x.x) 5)

Something more complicated:
  (((x.(y.(y x))) 1) (x.x))

No comments: