Skip to content

Commit 71fb800

Browse files
authored
Updated Exercise -10.4,Earlier it was repeating identical solution muptiple times.
Add a cut at line 109 to terminate repetition.
1 parent 6364caf commit 71fb800

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chapter-10/exercises.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
directTrain(X, Y).
107107

108108
directPath(X, Y) :-
109-
directTrain(Y, X).
109+
directTrain(Y, X),!.
110110

111111
%% base case
112112
route(Y, Y, RevL, L) :-

0 commit comments

Comments
 (0)