summaryrefslogtreecommitdiff
path: root/inst
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2023-03-11 19:33:49 +0100
committerMirek Kratochvil <exa.exa@gmail.com>2023-03-11 19:33:49 +0100
commit535598bd84e79e92f536a375030d2fac45b881d1 (patch)
treeaa141485a78792a3d026bcb2181642bbd4a6608d /inst
parent21568698372891712b888ca765a5c21496b5020e (diff)
downloadprlg-535598bd84e79e92f536a375030d2fac45b881d1.tar.gz
prlg-535598bd84e79e92f536a375030d2fac45b881d1.tar.bz2
phrase phrases
Diffstat (limited to 'inst')
-rw-r--r--inst/prelude.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/inst/prelude.pl b/inst/prelude.pl
index 54246ba..2bb0b39 100644
--- a/inst/prelude.pl
+++ b/inst/prelude.pl
@@ -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).