% nacteni:
/* ['2.4.2_8.pl']. */

append_dl(A-B,B-C,A-C).

% demonstracni vypis

  % abychom se vyhli varovanim "Redefined static procedure ..."
:- dynamic
       write_all_X/3,
       start/0.

write_all_X(Goal,X,Name):-
            call(Goal),write('  '),write(Name),write(' = '),write(X),nl,fail.
write_all_X(_,_,_).
       
start:- 
    write('Prace se seznamy - efektivita append'),nl,nl,
    write('Vysledek volani "append_dl([a,b|X]-X,[c,d|Y]-Y,L)":'),nl,
    write_all_X(append_dl([a,b|X]-X,[c,d|Y]-Y,L), L, 'L'),nl.

?-start.


:- retractall(start/0).
