Re: Singleton variable in branch
Feliks Kluzniak <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On Dec 16, 2013, at 16:58, FERNANDO SAENZ PEREZ <[email protected]> wrote: > p(A) :- > ( functor(A, _, B) > -> ( foo(B) > -> foo(B) > ; foo(B) > ) > ; foo(B) > ). > true. > > %%%%%%%%%%%%%%%%%%%%%% > > I do not understand the warning. I think that B is used in all branches, > isn't it? It seems to me that if the functor/3 fails, then the B in the last branch is indeed a singleton. Am I missing something? Regards, — Feliks