pred()

The pred() system function will return the predecessor or the passed-in value, in other words, the value decremented by 1.

Syntax:

method pred(value: Value): Value;
Value pred(Value value);
func pred(_ value: Value) -> Value
Value pred(Value value);

The resulting type is equivalent to the passed value (referred to as Value above), and can be any Integer or Char type.

See Also