Module lambda_calculus::list [] [src]

Functions

cons

Applied to two terms it returns them encoded as a list.

first

Applied to a Church-encoded pair (a, b) it yields a.

head

Applied to a Church-encoded list it returns its first element.

is_nil

Equivalent to first(); applied to a Church-encoded list it determines if it is empty.

nil

Produces a Church-encoded nil, the last link of a Church-encoded list.

pair

Produces a Church-encoded pair; applying it to two other terms puts them inside it.

second

Applied to a Church-encoded pair (a, b) it yields b.

tail

Applied to a Church-encoded list it returns a new list with all its elements but the first one.