phrase phrases
This commit is contained in:
parent
2156869837
commit
535598bd84
|
@ -1,8 +1,8 @@
|
||||||
member(X, [X|_]).
|
member(X, [X|_]).
|
||||||
member(X, [_|T]) :- member(X,T).
|
member(X, [_|T]) :- member(X,T).
|
||||||
|
|
||||||
append([], [], []) :- !.
|
append([], [], []).
|
||||||
append([], [H|T], [H|T]) :- !.
|
append([], [H|T], [H|T]).
|
||||||
append([X|T], Y, [X|TY]) :- append(T,Y,TY).
|
append([X|T], Y, [X|TY]) :- append(T,Y,TY).
|
||||||
|
|
||||||
list([]).
|
list([]).
|
||||||
|
@ -83,3 +83,5 @@ expand_phrasecall(X, Xp, S0, S) :- !,
|
||||||
struct(X, Id, Args),
|
struct(X, Id, Args),
|
||||||
append(Args, [S0, S], Args1),
|
append(Args, [S0, S], Args1),
|
||||||
struct(Xp, Id, Args1).
|
struct(Xp, Id, Args1).
|
||||||
|
|
||||||
|
phrase(X, S0, S) :- expand_phrasecall(X, Xp, S0, S), call(Xp).
|
||||||
|
|
Loading…
Reference in a new issue