Re: negotiation by failure- list operations



Hi everybody,

great that so many people are getting into my propblem.
i think i found a solution - maybe u guys can check it

delete1(E,L1,L2):-not(member(E,L1)),write(yes),L2=L1,!.
delete1(_, [], []).
delete1(Head, [Head | Tail], Result):-!, delete5(Head, Tail, Result).
delete1(Element, [Head | Tail], [Head | NewTail]):-!, delete5(Element,
Tail, NewTail).

what happens on swi ?
====
?- delete1(a,[b,d],X).
yes

X = [b, d] ;

No
===

i think thats what i searched for
or is there maybe a shorter way- especially for not getting to answer
the X question ? can i make a cut with a real stop! - and of course my
"yes" String ?

.