How can I implement conc with difference list?



Hi all,

I am learning prolog now, and i want to implement conc with difference
list,

actually, using concat(concatenation using difference list).

concat(A1-Z1, Z1-Z2, A1-Z2).

and conc is like this.(as you know)

conc(L1,L2,L3).

I want to implements conc with concat, and vice versa.

like this :

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

and also,

concat(A1-Z1, Z1-Z2, A1-Z2) :-
conc(......).

please, Help me!

thanx, all.

.



Relevant Pages

  • Re: How can I implement conc with difference list?
    ... } I am learning prolog now, and i want to implement conc with difference ... Unfortunately this boils down to a different in data structure. ... What you're asking is like "I want my version of linear search ...
    (comp.lang.prolog)
  • Re: How can I implement conc with difference list?
    ... I heard that implementing conc with concatis possible. ... Then to use conc from concat or vice versa (but not both in the same program, ... of course) requires a conversion from the input list type to the "inner" list ... inner list type to the output list type. ...
    (comp.lang.prolog)
  • Re: How can I implement conc with difference list?
    ... but I just want to know 'how' to implement conc and concat with ... I heard that implementing conc with concat(vice versa) is possible. ... am a newbie. ...
    (comp.lang.prolog)