Church Encoding - List Encodings

List Encodings

An encoding of (immutable) lists of varying length must define a constructor for creating an empty list (nil), an operation testing whether or not a list is empty (isnil), an operation to prepend a given value to a (possibly empty) list (cons), and two operations to determine the first element and the list of the remaining elements of a nonempty list (head and tail).

Read more about this topic:  Church Encoding

Famous quotes containing the word list:

    Shea—they call him Scholar Jack—
    Went down the list of the dead.
    Officers, seamen, gunners, marines,
    The crews of the gig and yawl,
    The bearded man and the lad in his teens,
    Carpenters, coal-passers—all.
    Joseph I. C. Clarke (1846–1925)