Lambda Shell

Simple shell for evaluating lambda expressions

Maintainer: robdockins AT fastmail DOT fm
Current Version: 0.9.1
Current Release Date: November 27, 2007
Darcs repo:
Hackage LambdaShell

About the Lambda Shell

The Lambda Shell is a feature-rich shell environment and command-line tool for evaluating terms of the pure, untyped lambda calculus. The Lambda Shell builds on the shell creation framework Shellac, and showcases most of Shellac's features.


The Lambda Shell is licensed under the GNU GPL version 2. See the LICENSE file for details.

Sample session

The Lambda Shell, version 0.3
Copyright 2005-2006, Robert Dockins

The Lambda Shell comes with ABSOLUTELY NO WARRANTY; for details
type ':nowarranty'.  This is free software, and you are welcome to
redistribute it under certain conditions; type ':gpl'
for details

> (\x y. x) (\a. a) (\b. b)
\a. a
> :load prelude.lam
> :show four
four = succ three
> four
\f x. f (f (f (f x)))
> mul two three
\f x. f (f (f (f (f (f x)))))
> let x = plus six two
> x == eight
> x == nine
not equal
> one
\f x. f x
> [[ one ]]
\f k. k (\x k_0. f x k_0)
> :showcount
showcount on
> sub seven two
\f x. f (f (f (f (f x))))
<<90 reductions>>
> let l = insertSort (cons two (cons three (cons one nil)))
> index zero l
<<463 reductions>>
> index one l
<<2135 reductions>>
> index two l
<<5720 reductions>>
> :quit