succ()
The succ()
system function will return the successor or the passed-in value, in other words, the value incremented by 1
.
Syntax:
method succ(value: Value): Value;
Value succ(Value value);
func succ(_ value: Value) -> Value
Value succ(Value value);
The resulting type is equivalent to the passed value (referred to as Value
above), and can be any Integer or Char type.