Class Succ


public class Succ extends PrimitiveFunction
Returns the successor of an integer.
  • Constructor Details

    • Succ

      public Succ()
  • Method Details

    • name

      public Name name()
      Gets the name of this primitive function.
      Specified by:
      name in class PrimitiveFunction
      Returns:
      the function name
    • type

      public TypeScheme type()
      Gets the type scheme for this function.
      Specified by:
      type in class PrimitiveFunction
      Returns:
      the type scheme
    • implementation

      protected Function<List<Term>,Flow<Graph,Term>> implementation()
      Provides the implementation of this function.
      Specified by:
      implementation in class PrimitiveFunction
      Returns:
      a function that maps terms to a flow of terms
    • apply

      public static Integer apply(Integer num)
      Returns the value plus one.
      Parameters:
      num - the value
      Returns:
      the successor