eru


eru is a simple and rather dumb λ term reducer.

You can get the source code here.

Syntax

item description where

λarg.body or \arg.body

a λ abstraction

arg is a name of an argument and body is any other λ term

(func arg)

a function application

func is an anonymous or named λ abstraction and arg is any other λ term

#term

reduce term at read-time

term is a λ term to be reduced

name ← value or name <- value

toplevel environment binding of a λ abstraction or a value to a name

name is a new name for a given term and value is the bound term.

A program is a mixture of all of those. The value bound to the name `output' is reduced and printed to the standard output.

You can use the -v (verbose) flag to show the number of passes used.

You can use the -vv (very verbose) flag to show every single step of reduction.

Files in lib/ are compiled into the `eru' binary, and can be later included in your program with:

.include basename.l
so, lib/cons.l would be included with
.include cons.l
the .include directive will try to include a file from your local file system, when a given filename is not compiled in.

Examples