Package hydra.lib.math
Class Succ
java.lang.Object
hydra.tools.PrimitiveFunction
hydra.lib.math.Succ
Returns the successor of an integer.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class hydra.tools.PrimitiveFunction
term, toNative
-
Constructor Details
-
Succ
public Succ()
-
-
Method Details
-
name
Gets the name of this primitive function.- Specified by:
namein classPrimitiveFunction- Returns:
- the function name
-
type
Gets the type scheme for this function.- Specified by:
typein classPrimitiveFunction- Returns:
- the type scheme
-
implementation
Provides the implementation of this function.- Specified by:
implementationin classPrimitiveFunction- Returns:
- a function that maps terms to a flow of terms
-
apply
Returns the value plus one.- Parameters:
num- the value- Returns:
- the successor
-