Re: negotiation by failure- list operations



"Brian Hulley" wrote in message
news:1118834639.830063.226470@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> Nameless wrote:
>> Isn't this just a question of supplying a 'catch-all'
>> clause to delete1/3?
>>
>> delete1(X,L1,L2) :-
>> delete(X,L1,L2).
>> delete1(_,_,_).
>>
>
> On the right track, but:
>
> delete1(X,L1,L2) :-
> delete(X,L1,L2),!. % necessary (red) cut
> delete1(_,L,L). % Preserve original list in this case

Right, but we don't need to do all the OP's homework! Some
active thought processing on the OP's part is not too much
to ask, IMO.

--
Mail sent to this email address is deleted unread
on the server. Please send replies to the newsgroup.


.