Re: Comparing Two lists
- From: Nick Wedd <nick@xxxxxxxxxxxxx>
- Date: Thu, 20 Oct 2005 15:48:34 +0100
In message <b2a20b65891de5ab8ca79b81cb099af9@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>, DJRock <dj.rock@xxxxxxxxxxxxxx> writes
hi all i want to create prolog program in which i can compare two lists with having different elements That comparision should include transitivity and also can bound same elements Examples like 1) [a,b,c,d] == [a,?x,c,d] then ?x should bound with b 2) [a,?x,?y,d] == [a,b,c,d] then ?x = b and ?y = c 3) [a,?x,c,d] == [a,?y,?y,d] then ?y = c so ?x also = c If any one can think over this then it will be great thing thanks for looking at my problem
This is extremely easy to implement in Prolog.
What do you want it to do if the lists are different lengths?
Nick -- Nick Wedd nick@xxxxxxxxxxxxx .
- References:
- Comparing Two lists
- From: DJRock
- Comparing Two lists
- Prev by Date: Re: Prolog problem
- Next by Date: Re: Comparing Two lists
- Previous by thread: Comparing Two lists
- Next by thread: Re: Comparing Two lists
- Index(es):
Relevant Pages
|
|