An operator is an infixed function : for exemple ’+’ is an
operator and ’sin’ is a function.
An expression can be represented by a tree. The top of the tree is
either an operator, or a function and the leaves of the tree are the
arguments of the operator or of the function
(see also 2.37.11).
The instruction sommet (resp feuille (or op))
returns the top (resp. the list of the leaves) of an expression.
Input :
Output :
Input :
Output :
Input :
Or :
Output :
Input :
Or :
Output :
Remark
Suppose that a function is defined by a program, for example
let us define the pgcd function :
Then input :
Output :
Then input :
Output :
Then input :
Output :
Then input :
Output :