Module lambda_calculus::data::num::church

source ·
Expand description

Functions§

  • Applied to two Church-encoded numbers it produces their sum.
  • Applied to two Church-encoded numbers it returns a Church-encoded pair with the result of their division - the quotient and the remainder.
  • Applied to two Church-encoded numbers it returns a lambda-encoded boolean indicating whether its first argument is equal to the second one.
  • Applied to a Church-encoded number it yields its Church-encoded factorial.
  • Applied to two Church-encoded numbers it returns a lambda-encoded boolean indicating whether its first argument is greater than or equal to the second one.
  • Applied to two Church-encoded numbers it returns a lambda-encoded boolean indicating whether its first argument is greater than the second one.
  • Applied to a Church-encoded number it produces a lambda-encoded boolean, indicating whether its argument is even.
  • Applied to a Church-encoded number it produces a lambda-encoded boolean, indicating whether its argument is odd.
  • Applied to a Church-encoded number it produces a lambda-encoded boolean, indicating whether its argument is equal to zero.
  • Applied to two Church-encoded numbers it returns a lambda-encoded boolean indicating whether its first argument is less than or equal to the second one.
  • Applied to two Church-encoded numbers it returns a lambda-encoded boolean indicating whether its first argument is less than the second one.
  • Applied to two Church-encoded numbers it returns the greater one.
  • Applied to two Church-encoded numbers it returns the smaller one.
  • Applied to two Church-encoded numbers it yields their product.
  • Applied to two Church-encoded numbers it returns a lambda-encoded boolean indicating whether its first argument is not equal to the second one.
  • Produces a Church-encoded number one.
  • Applied to two Church-encoded numbers it raises the first one to the power of the second one.
  • Applied to a Church-encoded number it produces its predecessor.
  • Applied to two Church-encoded numbers it returns a Church-encoded quotient of their division.
  • Applied to two Church-encoded numbers it returns a Church-encoded remainder of their division.
  • Applied to two Church-encoded numbers a and b it returns the left logical shift of a performed b times.
  • Applied to two Church-encoded numbers a and b it returns the right logical shift of a performed b times.
  • Applied to two Church-encoded numbers it subtracts the second one from the first one.
  • Applied to a Church-encoded number it produces its successor.
  • Applied to a Church-encoded number it produces the equivalent Parigot-encoded number.
  • Applied to a Church-encoded number it produces the equivalent Scott-encoded number.
  • Applied to a Church-encoded number it produces the equivalent Stump-Fu-encoded number.
  • Produces a Church-encoded number zero; equivalent to boolean::fls.