Subject: [SWIPL] help please ( newbie )

From: Sebastian Schneider <[email-masked]>
Date: Tue, 18 Dec 2001 12:11:10 +0000

hello!

i try the following:

*find the min from a list

minimum([], Max, Max).
minimum([Kopf|Rest], Max0, Max):- Max1 is min(Max0, Kopf), minimum(Rest,
Max1, Max).
minimum([Kopf|Rest], Max):- minimum(Rest, Kopf, Max).

*if the min not in list(X) then save min in list(X)

assert(list(min))

*if the min in list(X) ( so list(min) ) then min+1 and save again in
list.

!!!THIS I DONT KNOW!!!

??? i know it cant be very difficult but all i try doesn't work. can
anybopdy give me the missing part? recursive solution would be very
welcome :-)

Many Thanks

Sebastian