Subject: troubles with SWI -Prolog

From: "Ed Kovach" <[email-masked]>
Date: Wed, 13 Sep 2000 16:10:38 -0400

Hi,

I'm having some problems getting some list operations to work.  The code is below
member1(X, [X | Tail] ).

member1(X, [Head | Tail] ) :- member1(X, Tail).

conc([ ], L, L).

conc( [X | L1], L2, [ X | L3] ) :- conc(L1, L2, L3).

add(X, L, [X|L]).

del( X, [X | Tail], Tail).

del (X, [ Y| Tail ], [ Y | Tail1] ) :- del(X, Tail, Tail1).

Member, conc and add work fine.  The del does not.  When I load the program using consul, I get an error that there is an operator excepted in line 12 (the last line.)  I don't see anything wrong.  I should note that I did have similar problems with conc.  It cleared up after I corrected an error in member1 (I forgot the ] to close the fist list in the first clause of member1.

Any help would be appreciated.

Ed Kovach [email-masked]