Module lambda_calculus::list [] [src]

Functions

append

Applied to 2 Church lists it concatenates them.

cons

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

filter

Applied to a predicate and a Church list it filters the list based on the predicate.

foldl

Applied to a function, a starting value and a Church list it performs a left fold on the list.

foldr

Applied to a function, a starting value and a Church list it performs a right fold on the list.

head

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

index

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

length

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

list

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

map

Applied to a function and a Church list it maps the function over it.

nil

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

null

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

reverse

Reverses a Church list.

tail

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