For any given predicate with arity greater than 0, each argument may be intended to have one of three calling patterns:
1st argument must be +We write this as2nd argument can be + or - and is therefore ?
mode successor(+,?).The notation used here is consistent with the mode declarations found in many Prolog libraries. For a further example, the mode declaration of is/2 is mode is(?,+).
Because of the discrepancy between the declarative and the procedural aspects of Prolog we often need to think carefully about the intended usage of a predicate. It is good practice to comment your code to indicate a predicate's intended usage.