So I have an assignment to work on and there is one thing I'm confused about. Here is a similar problem to what I'm trying to accomplish. Say I have these rules:
size(3).
size(5).
size(7).
size(1).
size(2).
size(9).
And I want to find the minimum of size by taking the value 3 and comparing it to 5, storing 3 and comparing it to 7, then comparing it to 1, storing 1 and comparing it to 2...returning a value of 1.
The only way I can see of doing that without a high order procedure would be some form of backtracking while there are still size(X) values and each time altering the size variable. However, I don't see how you can both backtrack and save the new minimum value. I was wondering if anyone could help put me on the right track.