--- yap-6.0.4.orig/library/dialect/hprolog.yap 2010-05-01 04:53:07.000000000 +1200 +++ yap-6.0.4/library/dialect/hprolog.yap 2010-05-16 09:10:46.000000000 +1200 @@ -38,7 +38,7 @@ split_at/4, % +N, +List, -FirstElements, -LastElements max_go_list/2, % +List, -Max or_list/2, % +ListOfInts, -BitwiseOr - sublist/2, % ?Sublist, +List + chr_sublist/2, % ?Sublist, +List bounded_sublist/3, % ?Sublist, +List, +Bound chr_delete/3, init_store/2, @@ -55,9 +55,9 @@ % lookup_ht1/4 ]). -:- reexport('../lists',[sublist/2]). +%:- reexport('../lists',[sublist/2]). -%:- use_module(library(lists)). +:- use_module(library(lists)). :- use_module(library(assoc)). /** hProlog compatibility library @@ -213,15 +213,15 @@ % % True if all elements of Sub appear in List in the same order. -%sublist(L, L). -%sublist(Sub, [H|T]) :- -% '$sublist1'(T, H, Sub). - -%'$sublist1'(Sub, _, Sub). -%'$sublist1'([H|T], _, Sub) :- -% '$sublist1'(T, H, Sub). -%'$sublist1'([H|T], X, [X|Sub]) :- -% '$sublist1'(T, H, Sub). +chr_sublist(L, L). +chr_sublist(Sub, [H|T]) :- + '$sublist1'(T, H, Sub). + +'$sublist1'(Sub, _, Sub). +'$sublist1'([H|T], _, Sub) :- + '$sublist1'(T, H, Sub). +'$sublist1'([H|T], X, [X|Sub]) :- + '$sublist1'(T, H, Sub). %% bounded_sublist(?Sub, +List, +Bound:integer) %