phrase phrases

This commit is contained in:
Mirek Kratochvil 2023-03-11 19:33:49 +01:00
parent 2156869837
commit 535598bd84

View file

@ -1,8 +1,8 @@
member(X, [X|_]).
member(X, [_|T]) :- member(X,T).
append([], [], []) :- !.
append([], [H|T], [H|T]) :- !.
append([], [], []).
append([], [H|T], [H|T]).
append([X|T], Y, [X|TY]) :- append(T,Y,TY).
list([]).
@ -83,3 +83,5 @@ expand_phrasecall(X, Xp, S0, S) :- !,
struct(X, Id, Args),
append(Args, [S0, S], Args1),
struct(Xp, Id, Args1).
phrase(X, S0, S) :- expand_phrasecall(X, Xp, S0, S), call(Xp).