Task

Create a function that returns the maximum value in a provided set of values,

where the number of values may not be known until run-time.




 
max([X| Xs], Max) :-
    max(Xs, X, Max).
 
max([], Max, Max).
max([X| Xs], Aux, Max) :-
    (   X @> Aux ->
        max(Xs, X, Max)
    ;   max(Xs, Aux, Max)
    ).