Mercurial > hg > Applications > Lite
comparison infinite.pl @ 13:d2aa6137e9a9
*** empty log message ***
author | kono |
---|---|
date | Sat, 20 Jan 2001 18:14:58 +0900 |
parents | 66d0522d46e8 |
children | 816425e04ea7 |
comparison
equal
deleted
inserted
replaced
12:66d0522d46e8 | 13:d2aa6137e9a9 |
---|---|
49 setof(S,(links(S,1),integer(S)),Children), | 49 setof(S,(links(S,1),integer(S)),Children), |
50 more_only_node(1,Children,L,[],[1]). | 50 more_only_node(1,Children,L,[],[1]). |
51 infinite([]) :- | 51 infinite([]) :- |
52 found_infinite. | 52 found_infinite. |
53 | 53 |
54 % more_only(S) :- | |
55 % state(S,[empty|_],true),!,fail. | |
56 % more_only(S) :- number(S). | |
57 | |
54 more_only(S) :- | 58 more_only(S) :- |
55 state(S,[empty|_],true),!,fail. | 59 number(S), |
56 more_only(S) :- number(S). | 60 state(S,[more|_],_). |
57 | 61 |
58 more_only_node(S,[S1|Children],[S|L],L1,Hist) :- | 62 more_only_node(S,[S1|Children],[S|L],L1,Hist) :- |
59 % write('checking '),write(S),nl, | 63 % write('checking '),write(S),nl, |
60 more_only(S),!, | 64 more_only(S),!, |
61 % starting false loop | 65 % starting false loop |