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.




integer
lmax(list l)
{
    integer max, x;
 
    max = l[0];
 
    for (, x in l) {
        if (max < x) {
            max = x;
        }
    }
 
    max;
}