Every thing X also has a parent P , which indicates a larger class to which every instance x of X belongs. We also say that X is a subclass of P. For example, the mathematical notion of a module P and a submodule X may be modelled this way. The parent of x can be obtained with the function parent.
i1 = parent 2 o1 = Nothing o1 : Type Nothing -- the empty class.
i2 = parent parent 2 o2 = Thing o2 : Type Thing -- the class of all things.
i3 = parent parent parent 2 o3 = Thing o3 : Type Thing -- the class of all things.
i4 = class 2 o4 = ZZ o4 : Ring ZZ -- denotes the class of all integers.
i5 = parent class 2 o5 = Thing o5 : Type Thing -- the class of all things.
i6 = parent parent class 2 o6 = Thing o6 : Type Thing -- the class of all things.
i7 = class class 2 o7 = Ring o7 : Type Ring -- the class of all rings.
i8 = parent class class 2 o8 = Type o8 : Type Type -- the class of all types.
i9 = parent parent class class 2 o9 = MutableHashTable o9 : Type MutableHashTable -- the class of all mutable hash tables.
i10 = parent parent parent class class 2 o10 = HashTable o10 : Type HashTable -- the class of all hash tables.
i11 = parent parent parent parent class class 2 o11 = Thing o11 : Type Thing -- the class of all things.
The classes and parents provide a uniform way for operations on things to locate the appropriate functions needed to perform them. Please see using methods and binary method now for a brief discussion.
For more details, see one of the topics below.
For related topics, see one of the following.
Go to main index.
Go to concepts index.