Module lambda_calculus::list [] [src]

Functions

append

Applied to 2 Church-encoded lists it concatenates them.

cons

Equivalent to pair::pair(); applied to two terms it returns them contained in a Church-encoded list.

head

Equivalent to pair::first(); applied to a Church-encoded list it returns its first element.

index

Applied to a Church-encoded number i and a Church-encoded list it returns the i-th (zero-indexed) element of the list.

length

Applied to a Church-encoded list it returns its Church-encoded length.

list

Applied to a Church-encoded number n and n Terms it creates a Church-encoded list of those terms.

nil

Equivalent to booleans::fls(); produces a Church-encoded nil, the last link of a Church-encoded list.

null

Applied to a Church-encoded list it determines if it is empty.

reverse

Reverses a Church-encoded list.

tail

Equivalent to pair::second(); applied to a Church-encoded list it returns a new list with all its elements but the first one.