Skip to content

Commit

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

f.

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

% No local vars & no structures, yet not recovered...

f(_, _).

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

main :-
test1(100000); test2(200000); test3(300000); true.

0 comments on commit 47c6e90

Please sign in to comment.