gapt.examples.church_numerals

Members list

Type members

Classlikes

object cond

Conditional if c = 0 then e1 else e2

Conditional if c = 0 then e1 else e2

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
cond.type
object int_of_num

Computes the int value of a Church numeral.

Computes the int value of a Church numeral.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
int_of_num.type
object is_num

Checks if lambda expression is a Church numeral.

Checks if lambda expression is a Church numeral.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
is_num.type
object num

A straightforward implementation of Church numerals. Numbers up to 50000 should work fine, above various functions (beta-reduction, substitution, printing, ...) run out of stack.

A straightforward implementation of Church numerals. Numbers up to 50000 should work fine, above various functions (beta-reduction, substitution, printing, ...) run out of stack.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
num.type
object plus

Addition of Church numerals. Does not check if the input is a church numeral.

Addition of Church numerals. Does not check if the input is a church numeral.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
plus.type
object times

Multiplication of Church numerals. Does not check if the input is a church numeral.

Multiplication of Church numerals. Does not check if the input is a church numeral.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
times.type