Module lambda_calculus::data::list::pair

source ·
Expand description

Functions§

  • Applied to two pair-encoded lists it concatenates them.
  • Applied to two terms it returns them contained in a pair-encoded list; equivalent to pair::pair.
  • Applied to a Church-encoded number n and a pair-encoded list it returns a new list without the first n elements of the supplied list.
  • Applied to a predicate function and a pair-encoded list it returns a new list without the prefix of the supplied list whose elements satisfy the predicate function.
  • Applied to a predicate and a pair-encoded list it filters the list based on the predicate.
  • Applied to a function, a starting value and a pair-encoded list it performs a left fold on the list.
  • Applied to a function, a starting value and a pair-encoded list it performs a right fold on the list.
  • Applied to a pair-encoded list it returns its first element; equivalent to pair::fst.
  • Applied to a Church-encoded number i and a pair-encoded list it returns the i-th (zero-indexed) element of the list.
  • Applied to a pair-encoded list it returns the list without the last element.
  • Applied to a pair-encoded list it determines if it is empty.
  • Applied to a pair-encoded list it returns the last element.
  • Applied to a pair-encoded list it returns its Church-encoded length.
  • Applied to a Church-encoded number n and n Terms it creates a pair-encoded list of those terms.
  • Applied to a function and a pair-encoded list it maps the function over it.
  • Produces a nil, the last link of a pair-encoded list; equivalent to boolean::fls.
  • Applied to a Church-encoded number n and an argument, it produces a list containing the argument repeated n times.
  • Reverses a pair-encoded list.
  • Applied to a pair-encoded list it returns a new list with all its elements but the first one; equivalent to pair::snd.
  • Applied to a Church-encoded number n and a pair-encoded list it returns a new list with the first n elements of the supplied list.
  • Applied to a predicate function and a pair-encoded list it returns the longest prefix of the list whose elements all satisfy the predicate function.
  • Applied to two pair-encoded lists it returns a list of corresponding pairs. If one input list is shorter, excess elements of the longer list are discarded.
  • Applied to a function and two pair-encoded lists it applies the function to the corresponding elements and returns the resulting list. If one input list is shorter, excess elements of the longer list are discarded.