Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
infradig committed Oct 1, 2024
1 parent ed7de11 commit ffa547a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions samples/tco.pl
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
test1(0) :- !, statistics, nl, fail.
test1(0) :- !, statistics, fail.
test1(N) :- N1 is N-1, test1(N1).

f.

test2(0) :- !, statistics, nl, fail.
test2(0) :- !, statistics, fail.
test2(N) :- f, N1 is N-1, test2(N1).

f(1).

test3(0) :- !, statistics, nl, fail.
test3(0) :- !, statistics, fail.
test3(N) :- f(_), N1 is N-1, test3(N1).

f(_, _).

test4(0) :- !, statistics, fail.
test4(I) :- f(I, _), I2 is I-1, test4(I2).

statistics.

main :-
test1(100000);
test2(200000);
Expand Down

0 comments on commit ffa547a

Please sign in to comment.