I want to create a prolog program so that it can search for the minimum number in a list and when the user asks for more solutions (using the ; symbol) the program returns the next minimum number. If the user asks for another solution it returns the next number and so on. I've created the minimum predicate but can't make it to backtrack to get more results, please help.
Thanks in advance.
P.S I am using Swi-prolog