From 9799fbd9e8c7fd186365c628bf2024d458dafc75 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Tue, 29 Jun 2021 18:46:18 +0000 Subject: Understand :-initialization(Goal) directive --- example.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'example.pl') diff --git a/example.pl b/example.pl index 6fff9b3..8f5f0c2 100644 --- a/example.pl +++ b/example.pl @@ -16,10 +16,11 @@ likes(sam, ice). could_be_friends(Person1, Person2) :- likes(Person1, Thing1), likes(Person2, Thing2), - !, Thing1 = Thing2. list1(A) :- A = [1,2,3,4]. list2(A) :- A = [a,b|c]. -curly(A) :- A = {one,two,three}. \ No newline at end of file +curly(A) :- A = {one,two,three}. + +:- initialization(could_be_friends(bob, sam)). \ No newline at end of file -- cgit v1.2.3